From: Elena Zannoni <ezannoni@redhat.com>
To: Pierre Muller <muller@cerbere.u-strasbg.fr>
Cc: "Sarnath K - CTD, Chennai." <k_sarnath@ctd.hcltech.com>,
gdb@sources.redhat.com, msnyder@redhat.com
Subject: RE: "xbreak" command in GDB ?
Date: Mon, 28 Jan 2002 11:18:00 -0000 [thread overview]
Message-ID: <15445.39138.263876.568561@localhost.cygnus.com> (raw)
In-Reply-To: <4.2.0.58.20020125093551.00a481f0@ics.u-strasbg.fr>
Pierre Muller writes:
> At 09:29 25/01/2002 , Sarnath K - CTD, Chennai. a écrit:
> > >Simply try
> > >./gdb ./gdb
> > >break main
> > >xbreak main
> > >disas main
> >
> > GDB never exits via the leaving point
> >of main() function, I suppose.
> >It exits via "quit_command" function.
> >I vaguely remember this ( when I was
> >browsing GDB source code.) So this test
> >might not reflect things correctly.
> >Correct me if I am wrong
>
> I didn't want to say that you should run the progream after.
> Simply comparing the address of the xbreak with
> the position of the ret instruction
> in the function disassembly is enough to
> show that you are right in saying that this
> command is buggy for i386 at least.
>
> Looking into source it apears that this is
> related to function
> find_pc_sect_partial_function
>
> because xbreak uses the returned endaddr value.
>
> function description says that
> /* Finds the "function" (text symbol) that is smaller than PC but
> greatest of all of the potential text symbols in SECTION. Sets
> *NAME and/or *ADDRESS conditionally if that pointer is non-null.
> If ENDADDR is non-null, then set *ENDADDR to be the end of the
> function (exclusive), but passing ENDADDR as non-null means that
> the function might cause symbols to be read. This function either
> succeeds or fails (not halfway succeeds). If it succeeds, it sets
> *NAME, *ADDRESS, and *ENDADDR to real information and returns 1.
> If it fails, it sets *NAME, *ADDRESS, and *ENDADDR to zero and
> returns 0. */
>
> The exclusive attribute should be the reason why this works
> but the endaddress is simply set by
> cache_pc_function_high = BLOCK_END (SYMBOL_BLOCK_VALUE (f));
> (cache_pc_function_high is copied into endaddr at function end)
>
> But I don't think that BLOCK_END should
> exclude any instruction, so its probably here that we should
> decrement but there is no code for
> function_epilogue in i386-tdep.c
>
Yes, this command was introduced with the infimous HP merge. xbreak
and txbreak never worked as advertized. If you look at the HP sources
(available at the www.hp.com) you'll notice that they added some very
very very platform specific hacks to make the command work.
Similarly for another command 'bx' available in xdb mode only.
None of these commands are documented or tested.
Michael, what should we do?
Elena
>
>
> Pierre Muller
> Institut Charles Sadron
> 6,rue Boussingault
> F 67083 STRASBOURG CEDEX (France)
> mailto:muller@ics.u-strasbg.fr
> Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99
next prev parent reply other threads:[~2002-01-28 19:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <EF836A380096D511AD9000B0D021B52754B482@narmada.ctd.hcltech .com>
2002-01-25 1:20 ` Pierre Muller
2002-01-28 11:18 ` Elena Zannoni [this message]
2002-01-25 0:33 Sarnath K - CTD, Chennai.
-- strict thread matches above, loose matches on Subject: below --
2002-01-25 0:24 Sarnath K - CTD, Chennai.
2002-01-24 1:33 Sarnath K - CTD, Chennai.
2002-01-24 23:46 ` Eli Zaretskii
2002-01-25 0:27 ` Pierre Muller
2002-01-31 12:45 ` Michael Snyder
2002-01-31 12:39 ` Michael Snyder
2002-01-31 12:43 ` Michael Snyder
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=15445.39138.263876.568561@localhost.cygnus.com \
--to=ezannoni@redhat.com \
--cc=gdb@sources.redhat.com \
--cc=k_sarnath@ctd.hcltech.com \
--cc=msnyder@redhat.com \
--cc=muller@cerbere.u-strasbg.fr \
/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