diff options
author | nobody <> | 2003-03-13 15:09:31 +0000 |
---|---|---|
committer | nobody <> | 2003-03-13 15:09:31 +0000 |
commit | ab015601f0f6fc053476cad220d7f7908fdcd850 (patch) | |
tree | 1b18f158e0c3c984b0d51341e12a27e9de72d63c /libiberty | |
parent | df12d73d19b31ec578eb6be37bb15e21b06ec746 (diff) | |
download | binutils-gdb-ab015601f0f6fc053476cad220d7f7908fdcd850.tar.gz |
This commit was manufactured by cvs2svn to create branchoffbyone-20030313-branchpoint
'offbyone-20030313-branch'.
Sprout from kettenis-i386newframe-20030308-branch 2003-03-08 00:00:32 UTC nobody 'This commit was manufactured by cvs2svn to create branch 'kettenis-'
Cherrypick from master 2003-03-13 15:09:29 UTC Nick Clifton <nickc@redhat.com> 'Add New Chinese (simplified) PO file.':
ChangeLog
Makefile.in
Makefile.tpl
bfd/ChangeLog
bfd/aout-cris.c
bfd/aout-encap.c
bfd/aout-ns32k.c
bfd/aout-tic30.c
bfd/bfd-in2.h
bfd/configure
bfd/configure.in
bfd/elf32-mips.c
bfd/elf32-ppc.c
bfd/elf64-mips.c
bfd/elf64-ppc.c
bfd/elfn32-mips.c
bfd/elfxx-mips.c
bfd/elfxx-target.h
bfd/hp300bsd.c
bfd/i386aout.c
bfd/i386dynix.c
bfd/i386linux.c
bfd/i386lynx.c
bfd/i386mach3.c
bfd/libbfd.h
bfd/m68k4knetbsd.c
bfd/m68klinux.c
bfd/m68klynx.c
bfd/m68knetbsd.c
bfd/m88kmach3.c
bfd/mipsbsd.c
bfd/newsos3.c
bfd/po/zh_CN.po
bfd/reloc.c
bfd/sparclinux.c
bfd/sparclynx.c
bfd/sparcnetbsd.c
bfd/vaxbsd.c
bfd/version.h
bfd/xsym.c
configure
configure.in
gdb/ChangeLog
gdb/MAINTAINERS
gdb/alpha-tdep.c
gdb/arch-utils.c
gdb/arm-tdep.c
gdb/avr-tdep.c
gdb/breakpoint.c
gdb/cli-out.c
gdb/config/m68k/tm-delta68.h
gdb/config/m68k/tm-linux.h
gdb/config/pa/tm-hppa.h
gdb/config/rs6000/tm-rs6000.h
gdb/config/sparc/tm-sparc.h
gdb/cris-tdep.c
gdb/d10v-tdep.c
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/doc/gdbint.texinfo
gdb/doublest.c
gdb/dummy-frame.c
gdb/eval.c
gdb/findvar.c
gdb/frame-unwind.h
gdb/frame.c
gdb/frv-tdep.c
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/h8300-tdep.c
gdb/hppa-tdep.c
gdb/i386-interix-tdep.c
gdb/i386-tdep.c
gdb/ia64-tdep.c
gdb/m68hc11-tdep.c
gdb/m68k-tdep.c
gdb/mcore-tdep.c
gdb/mi/ChangeLog
gdb/mi/mi-out.c
gdb/minsyms.c
gdb/mips-tdep.c
gdb/mn10300-tdep.c
gdb/ns32k-tdep.c
gdb/ns32knbsd-nat.c
gdb/ppc-linux-tdep.c
gdb/regcache.c
gdb/regcache.h
gdb/rs6000-tdep.c
gdb/s390-tdep.c
gdb/sentinel-frame.c
gdb/sh-tdep.c
gdb/sparc-tdep.c
gdb/tui/ChangeLog
gdb/tui/tui-out.c
gdb/v850-tdep.c
gdb/valarith.c
gdb/vax-tdep.c
gdb/version.in
gdb/x86-64-tdep.c
gdb/x86-64-tdep.h
gdb/xstormy16-tdep.c
libiberty/ChangeLog
libiberty/cplus-dem.c
libiberty/hashtab.c
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 20 | ||||
-rw-r--r-- | libiberty/cplus-dem.c | 49 | ||||
-rw-r--r-- | libiberty/hashtab.c | 19 |
3 files changed, 62 insertions, 26 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index b3e904f975e..a45e537f4e2 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,23 @@ +2003-12-03 Jan Hubicka <jh@suse.cz> + + * hashtab.c (htab_expand): Fix warning. + + * hashtab.c (htab_expand): Compute the size of hashtable based + on the number of elements actually used. + (htab_traverse): Call htab_expand when table is too empty. + +2003-12-03 Jan Hubicka <jh@suse.cz> + + * hashtab.c (htab_expand): Compute the size of hashtable based + on the number of elements actually used. + (htab_traverse): Call htab_expand when table is too empty. + +2003-03-11 Carlo Wood <carlo@gnu.org> + + * cplus-dem.c (demangle_integral_value): Correction to reflect + patch of 2002-01-10 in order to also make negative multi-digits + without leading underscore work. + 2003-03-03 Mark Mitchell <mark@codesourcery.com> * cplus-dem.c: Add license exception to copyright notice. diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c index af35bc13119..59afcd371ba 100644 --- a/libiberty/cplus-dem.c +++ b/libiberty/cplus-dem.c @@ -1797,31 +1797,34 @@ demangle_integral_value (work, mangled, s) success = 0; - /* Negative numbers are indicated with a leading `m'. */ - if (**mangled == 'm') - { - string_appendn (s, "-", 1); - (*mangled)++; - } - else if (mangled[0][0] == '_' && mangled[0][1] == 'm') - { - /* Since consume_count_with_underscores does not handle the - `m'-prefix we must do it here, using consume_count and - adjusting underscores: we have to consume the underscore - matching the prepended one. */ - multidigit_without_leading_underscore = 1; - string_appendn (s, "-", 1); - (*mangled) += 2; - } - else if (**mangled == '_') - { - /* Do not consume a following underscore; - multidigit_without_leading_underscore will consume what should be - consumed. */ - leave_following_underscore = 1; + if (**mangled == '_') + { + if (mangled[0][1] == 'm') + { + /* Since consume_count_with_underscores does not handle the + `m'-prefix we must do it here, using consume_count and + adjusting underscores: we have to consume the underscore + matching the prepended one. */ + multidigit_without_leading_underscore = 1; + string_appendn (s, "-", 1); + (*mangled) += 2; + } + else + { + /* Do not consume a following underscore; + consume_count_with_underscores will consume what + should be consumed. */ + leave_following_underscore = 1; + } } else { + /* Negative numbers are indicated with a leading `m'. */ + if (**mangled == 'm') + { + string_appendn (s, "-", 1); + (*mangled)++; + } /* Since consume_count_with_underscores does not handle multi-digit numbers that do not start with an underscore, and this number can be an integer template parameter, @@ -1862,7 +1865,7 @@ demangle_integral_value (work, mangled, s) /* All is well. */ success = 1; } - } + } return success; } diff --git a/libiberty/hashtab.c b/libiberty/hashtab.c index 0429936e961..ebaa43b2c50 100644 --- a/libiberty/hashtab.c +++ b/libiberty/hashtab.c @@ -373,7 +373,14 @@ htab_expand (htab) oentries = htab->entries; olimit = oentries + htab->size; - nsize = higher_prime_number (htab->size * 2); + /* Resize only when table after removal of unused elements is either + too full or too empty. */ + if ((htab->n_elements - htab->n_deleted) * 2 > htab->size + || ((htab->n_elements - htab->n_deleted) * 8 < htab->size + && htab->size > 32)) + nsize = higher_prime_number ((htab->n_elements - htab->n_deleted) * 2); + else + nsize = htab->size; if (htab->alloc_with_arg_f != NULL) nentries = (PTR *) (*htab->alloc_with_arg_f) (htab->alloc_arg, nsize, @@ -601,8 +608,14 @@ htab_traverse (htab, callback, info) htab_trav callback; PTR info; { - PTR *slot = htab->entries; - PTR *limit = slot + htab->size; + PTR *slot; + PTR *limit; + + if ((htab->n_elements - htab->n_deleted) * 8 < htab->size) + htab_expand (htab); + + slot = htab->entries; + limit = slot + htab->size; do { |