From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6606 invoked by alias); 30 Aug 2002 01:58:23 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 6599 invoked from network); 30 Aug 2002 01:58:23 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 30 Aug 2002 01:58:23 -0000 Received: by localhost.redhat.com (Postfix, from userid 469) id A04AF108F6; Thu, 29 Aug 2002 21:56:27 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15726.53451.481824.889177@localhost.redhat.com> Date: Thu, 29 Aug 2002 20:28:00 -0000 To: Keith Seitz Cc: Elena Zannoni , gdb-patches@sources.redhat.com Subject: Re: [RFA] stack.c: Always set current_source_{symtab,line} In-Reply-To: References: <15726.14171.621119.721148@localhost.redhat.com> X-SW-Source: 2002-08/txt/msg01024.txt.bz2 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).] > > (I've removed all the event notifications to facilitate reading) > Another thought: could a testcase be added, just like the one below? thanks Elena > 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 > "},{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 > "},{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 >