From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10747 invoked by alias); 1 Apr 2008 18:10:34 -0000 Received: (qmail 10737 invoked by uid 22791); 1 Apr 2008 18:10:33 -0000 X-Spam-Check-By: sourceware.org Received: from qnxmail.qnx.com (HELO nimbus.ott.qnx.com) (209.226.137.76) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 01 Apr 2008 18:10:16 +0000 Received: by nimbus.ott.qnx.com with Internet Mail Service (5.5.2653.19) id <2BHW3GL7>; Tue, 1 Apr 2008 14:10:13 -0400 Message-ID: <47F27A80.2060906@qnx.com> From: Aleksandar Ristovski To: Aleksandar Ristovski Cc: Vladimir Prus , gdb-patches@sources.redhat.com, nickrob@snap.net.nz Subject: Re: [patch] fix for PR2424 Date: Tue, 01 Apr 2008 19:41:00 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) user-agent: Content-Type: text/plain; charset="iso-8859-15" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-04/txt/msg00025.txt.bz2 Aleksandar Ristovski wrote: > Vladimir Prus wrote: >> On Monday 10 March 2008 20:18:06 Aleksandar Ristovski wrote: >>> Vladimir Prus wrote: >>> The proposed patch (attached) will produce the following outputs: >>> >>> CLI: >>> (gdb) tbreak main >>> Temporary breakpoint 1 at 0x80483a0: file ./main.c, line 15. >>> (gdb) r >>> Starting program: /space/src/testcases/sigsegv/main >>> >>> Temporary breakpoint 1, main () at ./main.c:15 >>> 15 foo (p); >>> >>> MI: >>> (gdb) >>> -break-insert -t main >>> ^done,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x0804 83a0",func="main",file="./main.c",fullname="/space/src/testcases/sigsegv/mai n.c",line="15",times="0"} >>> (gdb) >>> -exec-run >>> ^running >>> (gdb) >>> *stopped,reason="breakpoint-hit",disp="del",bkptno="1",thread-id="0",frame={ addr="0x080483a0",func="main",args=[],file="./main.c",fullname="/space/src/t estcases/sigsegv/main.c",line="15"} >>> >> For consistency, it's better to use same printing of 'disp' as done >> in print_one_breakpoint_location: >> >> ui_out_field_string (uiout, "disp", bpdisps[(int) b->disposition]); >> >> bpdisps is actually a table local to print_one_breakpoint_location, >> but there's no reason why it cannot be made a global table. >> >> - Volodya >> > > New diff for code (testsuite remains the same as in previous email). Static > array bpstats moved to new function bpstat_text and function used. > > Note: I believe docs need also be changed since in the examples for mi protocol > there are no 'disp' fields. But I am not sure where do I need to make those changes. > > 2008-03-10 Aleksandar Ristovski > > * infrun.c (normal_stop) Move breakpoint_auto_delete further down > to allow printing to 'see' real reason of stop. This fixes PR 2424. > * breakpoint.c (bpdisp_texst): New function. The function takes over > the role of bpstats static array in print_one_breakpoint_location. > (print_it_typical): Print "Temporary breakpoint" instead > of just "Breakpoint" when breakpoint is, well, temporary. For mi-like > protocols, print disp field. > (print_one_breakpoint_location): Removed bpdisps static definition. > Call new bpstat_text function to get value for 'disp' field. > (mention): Print "Temporary breakpoint" instead of just "Breakpoint". > Any thoughts on this?