This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb/756: RFA: don't use minsym name when searching block


>Number:         756
>Category:       gdb
>Synopsis:       RFA: don't use minsym name when searching block
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 27 16:28:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     ac131313@redhat.com
>Release:        unknown-1.0
>Organization:
>Environment:

>Description:
See:
http://sources.redhat.com/ml/gdb-patches/2002-08/msg00680.html

I'd appreciate it if the C++ folks could check this out.  I don't have
a test case yet, but I'll try to put one together tomorrow.

2002-08-21  Jim Blandy  <jimb@redhat.com>

	* symtab.c (lookup_symbol_aux): In the case where we find a
	minimal symbol of an appropriate name and use its address to
	select a symtab to read and search, use `name' (as passed to us)
	as the demangled name when searching the symtab's global and
	static blocks, not the minsym's name.  The minsym's name might be
	mangled.

Index: gdb/symtab.c
===================================================================
RCS file: /cvs/src/src/gdb/symtab.c,v
retrieving revision 1.68
diff -c -r1.68 symtab.c
*** gdb/symtab.c	1 Aug 2002 17:18:33 -0000	1.68
--- gdb/symtab.c	22 Aug 2002 04:38:54 -0000
***************
*** 860,874 ****
  	      /* This is a function which has a symtab for its address.  */
  	      bv = BLOCKVECTOR (s);
  	      block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
! 	      sym = lookup_block_symbol (block, SYMBOL_NAME (msymbol),
! 					 mangled_name, namespace);
  	      /* We kept static functions in minimal symbol table as well as
  	         in static scope. We want to find them in the symbol table. */
  	      if (!sym)
  		{
  		  block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
! 		  sym = lookup_block_symbol (block, SYMBOL_NAME (msymbol),
! 					     mangled_name, namespace);
  		}
  
  	      /* sym == 0 if symbol was found in the minimal symbol table
--- 860,873 ----
  	      /* This is a function which has a symtab for its address.  */
  	      bv = BLOCKVECTOR (s);
  	      block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
! 	      sym = lookup_block_symbol (block, name, mangled_name, namespace);
  	      /* We kept static functions in minimal symbol table as well as
  	         in static scope. We want to find them in the symbol table. */
  	      if (!sym)
  		{
  		  block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
! 		  sym = lookup_block_symbol (block, name,
!                                              mangled_name, namespace);
  		}
  
  	      /* sym == 0 if symbol was found in the minimal symbol table

>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]