From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30576 invoked by alias); 23 Jan 2013 14:50:48 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 30541 invoked by uid 306); 23 Jan 2013 14:50:46 -0000 Date: Wed, 23 Jan 2013 14:50:00 -0000 Message-ID: <20130123145046.30526.qmail@sourceware.org> From: tromey@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] archer-tromey-remove-obj_section: fix bug in converts.cc test case X-Git-Refname: refs/heads/archer-tromey-remove-obj_section X-Git-Reftype: branch X-Git-Oldrev: b8b2f2c2e750806306bbe43388a08aaff3952205 X-Git-Newrev: 9bec2069a56da6ce06a61d0bcb46e097bc563988 X-SW-Source: 2013-q1/txt/msg00027.txt.bz2 List-Id: The branch, archer-tromey-remove-obj_section has been updated via 9bec2069a56da6ce06a61d0bcb46e097bc563988 (commit) via eac5dcffefaee05a38f52a1239ec7fa3003004b4 (commit) from b8b2f2c2e750806306bbe43388a08aaff3952205 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 9bec2069a56da6ce06a61d0bcb46e097bc563988 Author: Tom Tromey Date: Wed Jan 23 07:49:09 2013 -0700 fix bug in converts.cc test case commit eac5dcffefaee05a38f52a1239ec7fa3003004b4 Author: Tom Tromey Date: Wed Jan 23 07:06:47 2013 -0700 try harder to find SOM symbol section in particular look past *UND* ----------------------------------------------------------------------- Summary of changes: gdb/somread.c | 18 ++++++++++++++++++ gdb/testsuite/gdb.cp/converts.cc | 3 ++- 2 files changed, 20 insertions(+), 1 deletions(-) First 500 lines of diff: diff --git a/gdb/somread.c b/gdb/somread.c index 806a8e6..02a3d88 100644 --- a/gdb/somread.c +++ b/gdb/somread.c @@ -294,6 +294,24 @@ som_symtab_read (bfd *abfd, struct objfile *objfile, error (_("Invalid symbol data; bad HP string table offset: %s"), plongest (bfd_getb32 (bufp->name))); + if (bfd_is_const_section (section)) + { + struct obj_section *iter; + + ALL_OBJFILE_OSECTIONS (objfile, iter) + { + if (bfd_is_const_section (iter->the_bfd_section)) + continue; + + if (obj_section_addr (iter) <= symbol_value + && symbol_value < obj_section_endaddr (iter)) + { + section = iter->the_bfd_section; + break; + } + } + } + prim_record_minimal_symbol_and_info (symname, symbol_value, ms_type, gdb_bfd_section_index (objfile->obfd, section), diff --git a/gdb/testsuite/gdb.cp/converts.cc b/gdb/testsuite/gdb.cp/converts.cc index 309008f..ecf8064 100644 --- a/gdb/testsuite/gdb.cp/converts.cc +++ b/gdb/testsuite/gdb.cp/converts.cc @@ -53,7 +53,8 @@ int main() //foo0_3(bppp); // Pointer-to-pointer-to-pointer base. foo0_3((A***)bppp); // to ensure that the function is emitted. - char *a; // pointer to.. + char av = 'a'; + char *a = &av; // pointer to.. B *bp; foo1_1 (a); // ..pointer foo1_2 (a); // ..array hooks/post-receive -- Repository for Project Archer.