Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Jim Blandy <jimb@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFA: don't use minsym name when searching block
Date: Thu, 22 Aug 2002 06:54:00 -0000	[thread overview]
Message-ID: <20020822125030.GA27560@nevyn.them.org> (raw)
In-Reply-To: <200208220526.g7M5Qp520822@zenia.red-bean.com>

On Thu, Aug 22, 2002 at 12:26:51AM -0500, Jim Blandy wrote:
> 
> 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.

Could you describe the problem?  Also... "the minsym's name might be
mangled" definitely seems like a problem; they should either be
consistently mangled or demangled...

> 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.

Style nit - a comment like this belongs in the code, not in the
changelog.

> 
> 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
> 

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


WARNING: multiple messages have this Message-ID
From: Daniel Jacobowitz <drow@mvista.com>
To: Jim Blandy <jimb@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFA: don't use minsym name when searching block
Date: Thu, 22 Aug 2002 05:50:00 -0000	[thread overview]
Message-ID: <20020822125030.GA27560@nevyn.them.org> (raw)
Message-ID: <20020822055000.PsFmNXp2C0kKhrRrWRUyxrN0zpTd_pSleO6fhNrpdTU@z> (raw)
In-Reply-To: <200208220526.g7M5Qp520822@zenia.red-bean.com>

On Thu, Aug 22, 2002 at 12:26:51AM -0500, Jim Blandy wrote:
> 
> 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.

Could you describe the problem?  Also... "the minsym's name might be
mangled" definitely seems like a problem; they should either be
consistently mangled or demangled...

> 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.

Style nit - a comment like this belongs in the code, not in the
changelog.

> 
> 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
> 

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2002-08-22 12:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-21 22:37 Jim Blandy
2002-08-22  6:54 ` Daniel Jacobowitz [this message]
2002-08-22  5:50   ` Daniel Jacobowitz
2002-08-29 14:41   ` Jim Blandy
2002-08-29 14:51     ` Daniel Jacobowitz
2002-08-29 21:01       ` Jim Blandy
2002-08-24  5:30 ` Peter.Schauer
2002-08-29 14:43   ` Jim Blandy
2002-08-29 14:50     ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020822125030.GA27560@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jimb@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox