Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Markus Deuling <deuling@de.ibm.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: GDB Patches <gdb-patches@sourceware.org>,
	        Ulrich Weigand <uweigand@de.ibm.com>
Subject: Re: [patch]: User choice for multiply-defined symbols
Date: Wed, 07 May 2008 11:36:00 -0000	[thread overview]
Message-ID: <482130DF.5010703@de.ibm.com> (raw)
In-Reply-To: <20080505114545.GA22274@caradoc.them.org>

Daniel Jacobowitz schrieb:
> On Mon, May 05, 2008 at 09:54:27AM +0200, Markus Deuling wrote:
>> Hello,
>>
>> the following patch makes use of the new "multiple-symbols" command introduced by Joel.
> 
> Hi Markus,
> 
> I'm totally confused by this explanation.  What case are you handling
> and what does it output before and after your patch?
> 

Hi Daniel,

I guess I should have explained it more in deep, sorry. I', referring to this discussion:
http://sourceware.org/ml/gdb-patches/2008-01/msg00007.html

By that time I also worked on a patch that implements a new command for users to enable a user choice for
ambiguous symbols:
http://sourceware.org/ml/gdb-patches/2008-01/msg00344.html

The actual sense of the patch was to check for multiply-defined symbols at lookup time. If found and the
user enabled user choice, a menu should appear to let the user choose which of the symbols to take.

As Joel's patch introduces such a user command I made use of it and based my patch upon. So my current
patch uses the new "multiple-symbols" command. If set to "ask" and ambiguous symbols are found, the
user choice is called (output from testcase):

(gdb) break foo
[0] cancel
[1] all
[2] foo at ../../../../src/gdb/testsuite/gdb.base/multiple_symbols_mod.c:5
[3] foo at ../../../../src/gdb/testsuite/gdb.base/multiple_symbols.c:14 

Without the patch GDB would take the first symbol "foo" it finds. I guess this would be the one in the main
executable in this case. To set a breakpoint at "foo" in multiple_symbols_mod.c the user has to explicitly
mention it. This exmaple shows the behaviour without patch:

(gdb) break foo
Breakpoint 2 at 0x100004b0: file ../../../../src/gdb/testsuite/gdb.base/multiple_symbols.c, line 14.

My patch doesn't change the default behaviour of GDB as the default setting for "multiple-symbols" is all 
and the search for ambiguous symbols only takes place if set to "ask".

Here's Joel's patch for the documentation changes:
http://sourceware.org/ml/gdb-patches/2008-04/msg00044.html

Regards,
Markus

-- 
  Markus Deuling
  GNU Toolchain for Linux on Cell BE
  deuling@de.ibm.com


  reply	other threads:[~2008-05-07  4:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-05  8:36 Markus Deuling
2008-05-05  9:06 ` Vladimir Prus
2008-05-05 10:11   ` Markus Deuling
2008-05-05 12:58 ` Daniel Jacobowitz
2008-05-07 11:36   ` Markus Deuling [this message]
2008-05-07 22:00     ` Daniel Jacobowitz
2008-05-08 11:43       ` Markus Deuling
2008-05-08 16:33         ` Eli Zaretskii

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=482130DF.5010703@de.ibm.com \
    --to=deuling@de.ibm.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.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