diff options
author | Jeff Law <law@redhat.com> | 2002-03-27 00:21:51 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 2002-03-27 00:21:51 +0000 |
commit | 3fa41cdbae5291fd9c33c2627db06e42074f2d60 (patch) | |
tree | d3ecec5568a53e11c6a5cf45dd1251118e68be85 | |
parent | b99d18333dd47aa5750a26999e683480f16fb1d4 (diff) | |
download | gdb-3fa41cdbae5291fd9c33c2627db06e42074f2d60.zip gdb-3fa41cdbae5291fd9c33c2627db06e42074f2d60.tar.gz gdb-3fa41cdbae5291fd9c33c2627db06e42074f2d60.tar.bz2 |
* somread.c (som_symtab_read): Remove some commented out code and
updated related comments. Do not set the minimal symbol table to
mst_solib_trampoline for ST_ENTRY symbols with SS_LOCAL scope
in a dynamic executable.
* hppa-tdep.c (find_proc_framesize): Sanely handle the case
where we are unable to find the minimal symbol for the given
PC value.
-rw-r--r-- | gdb/ChangeLog | 10 | ||||
-rw-r--r-- | gdb/hppa-tdep.c | 4 | ||||
-rw-r--r-- | gdb/somread.c | 33 |
3 files changed, 25 insertions, 22 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0500e94..b3bdce5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +2002-03-26 Jeff Law (law@redhat.com) + + * somread.c (som_symtab_read): Remove some commented out code and + updated related comments. Do not set the minimal symbol table to + mst_solib_trampoline for ST_ENTRY symbols with SS_LOCAL scope + in a dynamic executable. + * hppa-tdep.c (find_proc_framesize): Sanely handle the case + where we are unable to find the minimal symbol for the given + PC value. + 2002-03-25 Jeff Law (law@redhat.com) * linux-proc.c (read_mapping): Scan up to end of line for filename. diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index c27d964..e8a68cf 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -747,7 +747,9 @@ find_proc_framesize (CORE_ADDR pc) /* If Save_SP is set, and we're not in an interrupt or signal caller, then we have a frame pointer. Use it. */ - if (u->Save_SP && !pc_in_interrupt_handler (pc) + if (u->Save_SP + && !pc_in_interrupt_handler (pc) + && msym_us && !IN_SIGTRAMP (pc, SYMBOL_NAME (msym_us))) return -1; diff --git a/gdb/somread.c b/gdb/somread.c index e4fec18..38e35b2 100644 --- a/gdb/somread.c +++ b/gdb/somread.c @@ -117,20 +117,13 @@ som_symtab_read (bfd *abfd, struct objfile *objfile, can do the right thing for ST_ENTRY vs ST_CODE symbols). There's nothing in the header which easily allows us to do - this. The only reliable way I know of is to check for the - existence of a $SHLIB_INFO$ section with a non-zero size. */ - /* The code below is not a reliable way to check whether an - * executable is dynamic, so I commented it out - RT - * shlib_info = bfd_get_section_by_name (objfile->obfd, "$SHLIB_INFO$"); - * if (shlib_info) - * dynamic = (bfd_section_size (objfile->obfd, shlib_info) != 0); - * else - * dynamic = 0; - */ - /* I replaced the code with a simple check for text offset not being - * zero. Still not 100% reliable, but a more reliable way of asking - * "is this a dynamic executable?" than the above. RT - */ + this. + + This code used to rely upon the existence of a $SHLIB_INFO$ + section to make this determination. HP claims that it is + more accurate to check for a nonzero text offset, but they + have not provided any information about why that test is + more accurate. */ dynamic = (text_offset != 0); endbufp = buf + number_of_symbols; @@ -240,13 +233,11 @@ som_symtab_read (bfd *abfd, struct objfile *objfile, case ST_ENTRY: symname = bufp->name.n_strx + stringtab; - /* For a dynamic executable, ST_ENTRY symbols are - the stubs, while the ST_CODE symbol is the real - function. */ - if (dynamic) - ms_type = mst_solib_trampoline; - else - ms_type = mst_file_text; + /* SS_LOCAL symbols in a shared library do not have + export stubs, so we do not have to worry about + using mst_file_text vs mst_solib_trampoline here like + we do for SS_UNIVERSAL and SS_EXTERNAL symbols above. */ + ms_type = mst_file_text; bufp->symbol_value += text_offset; bufp->symbol_value = SMASH_TEXT_ADDRESS (bufp->symbol_value); break; |