From: Elena Zannoni <ezannoni@redhat.com>
To: Keith Seitz <keiths@redhat.com>
Cc: Elena Zannoni <ezannoni@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: [RFA] stack.c: Always set current_source_{symtab,line}
Date: Thu, 29 Aug 2002 12:32:00 -0000 [thread overview]
Message-ID: <15726.28975.902916.724508@localhost.redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0208290808500.1396-100000@valrhona.uglyboxes.com>
Keith Seitz writes:
> On Thu, 29 Aug 2002, Elena Zannoni wrote:
>
> > Seems an ok patch, but do you have an example command sequence
> > before/after that shows where things go wrong? I am having a bit of a
> > hard time visualizing the interaction.
>
> Sure. From the interpreter branch I've been using. [Sorry, I had the
> sequence wrong. The problem is with the "list" command, not "break". We
> had to do something similar in Insight, aka print_frame_info_listing_hook.
> If this patch gets approved, I can whack that hook (from Insight, at
> least).]
>
The tui uses it as well. Would it be feasible to clean that up too?
Ok, I am going to be a PITA: does this odd behavior occur with non-mi
gdb? I am not clear on why it is happening only with mi. Or at
least I don't see it in regular gdb.
Elena
> (I've removed all the event notifications to facilitate reading)
>
> Without patch:
> $ ./gdb -nx -q -i=mi gdb
> (gdb)
> -break-insert main
> ^done
> (gdb)
> -exec-run
> ^running
> (gdb)
> *stopped,reason="breakpoint-hit",bkptno="1",thread-id="0",frame={addr="0x08075006",func="main",args=[{name="argc",value="1"},{name="argv",value="0xbffff544"}],file="../../src/gdb/main.c",line="743"}
> (gdb)
> -break-insert catcher
> =breakpoint-create,number="2"
> ^done
> (gdb)
> -exec-continue
> ^running
> (gdb)
> *stopped,reason="breakpoint-hit",bkptno="2",thread-id="0",frame={addr="0x080fa8d9",func="catcher",args=[{name="func",value="0x80faad0
> <do_catch_errors>"},{name="func_uiout",value="0x829bb60"},{name="func_args",value="0xbffff4a8"},{name="func_val",value="0xbffff4b4"},{name="func_caught",value="0xbffff4b0"},{name="errstring",value="0x8226f20
> \"\""},{name="mask",value="6"}],file="../../src/gdb/top.c",line="401"}
> (gdb)
> -interpreter-exec console "list"
> ~"734\t catch_errors (captured_command_loop, 0, \"\", RETURN_MASK_ALL);\n"
> ~"735\t }\n"
> ~"736\t /* No exit -- exit is through quit_command. */\n"
> ~"737\t}\n"
> ~"738\t\n"
> ~"739\tint\n"
> ~"740\tmain (int argc, char **argv)\n"
> ~"741\t{\n"
> ~"742\t struct captured_main_args args;\n"
> ~"743\t args.argc = argc;\n"
> ^done
> (gdb)
>
> Note that we stopped in catcher(), but when we asked the console for a
> "list", it returned main().
>
> With patch:
> $ ./gdb -nx -q -i=mi gdb
> (gdb)
> -break-insert main
> ^done
> (gdb)
> -exec-run
> ^running
> (gdb)
> *stopped,reason="breakpoint-hit",bkptno="1",thread-id="0",frame={addr="0x08075006",func="main",args=[{name="argc",value="1"},{name="argv",value="0xbfffe744"}],file="../../src/gdb/main.c",line="743"}
> (gdb)
> -break-insert catcher
> ^done
> (gdb)
> -exec-continue
> ^running
> (gdb)
> *stopped,reason="breakpoint-hit",bkptno="2",thread-id="0",frame={addr="0x080fa8e9",func="catcher",args=[{name="func",value="0x80faae0
> <do_catch_errors>"},{name="func_uiout",value="0x829bb80"},{name="func_args",value="0xbfffe6a8"},{name="func_val",value="0xbfffe6b4"},{name="func_caught",value="0xbfffe6b0"},{name="errstring",value="0x8226f40
> \"\""},{name="mask",value="6"}],file="../../src/gdb/top.c",line="401"}
> (gdb)
> -interpreter-exec console list
> ~"401\t saved_error_pre_print = error_pre_print;\n"
> ~"402\t saved_quit_pre_print = quit_pre_print;\n"
> ~"403\t\n"
> ~"404\t if (mask & RETURN_MASK_ERROR)\n"
> ~"405\t error_pre_print = errstring;\n"
> ~"406\t if (mask & RETURN_MASK_QUIT)\n"
> ~"407\t quit_pre_print = errstring;\n"
> ~"408\t\n"
> ~"409\t /* Override the global ``struct ui_out'' builder. */\n"
> ~"410\t\n"
> ^done
> (gdb)
>
> Now we get the proper source listing from the console.
>
> Keith
>
next prev parent reply other threads:[~2002-08-29 19:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-14 16:25 Keith Seitz
2002-08-22 11:09 ` Keith Seitz
2002-08-26 15:57 ` Kevin Buettner
2002-08-29 8:07 ` Elena Zannoni
2002-08-29 9:10 ` Keith Seitz
2002-08-29 12:32 ` Elena Zannoni [this message]
2002-08-29 12:43 ` Keith Seitz
2002-08-29 12:54 ` Elena Zannoni
2002-08-29 13:16 ` Keith Seitz
2002-08-29 20:28 ` Elena Zannoni
2002-08-30 11:12 ` Keith Seitz
2002-08-30 12:44 ` Andrew Cagney
2002-08-30 12:57 ` Keith Seitz
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=15726.28975.902916.724508@localhost.redhat.com \
--to=ezannoni@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=keiths@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