This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [RFC] Fix the MI result of -break-insert with multiple locations


> -----Original Message-----
> From: Mircea Gherzan [mailto:mircea.gherzan@intel.com] 
> Sent: Tuesday, January 29, 2013 10:52 AM
> To: Marc Khouzam
> Cc: 'tromey@redhat.com'; 'vladimir@codesourcery.com'; 
> 'gdb-patches@sourceware.org'
> Subject: Re: [RFC] Fix the MI result of -break-insert with 
> multiple locations
> 
> On 29.01.2013 16:39, Marc Khouzam wrote:
>  > The above is an excerpt of the slightly more complete excerpt:
>  > body=[bkpt={number="1", ...},{number="1.1", 
> ...},{number="1.2", ...}]
>  >
>  > and I think this fits with MI grammar:
>  > "body" => variable
>  > =
>  > [bkpt=*] => value which is a list
>  > and a list can be composed of many values which can be tuples:
>  > {number="1", ...},{number="1.1", ...},{number="1.2", ...}
> 
> With a recent snapshot of the master branch [1], here's the 
> full output 
> without the patch:
> 
> (gdb)
> -break-insert foobar
> ^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="
> y",addr="<MULTIPLE>",times="0",original-location="foobar"},{nu
mber="1.1",enabled="y",addr="0x00000000004008d7",func="foobar()",file="overload.cpp",fullname=".../src/test-bktp-mi-> overload/overload.cpp",line="22",thread-groups=["i1"]},{number
="1.2",enabled="y",addr="0x00000000004008e0",func="foobar(int)",file="overload.cpp",fullname=".../src/test-bktp-mi-> overload/overload.cpp",line="26",thread-groups=["i1"]}
> (gdb)
> 
> So no square brackets. Therefore not a list and IMHO not a 
> valid MI output.

You're right.  The output I took was from -break-list, but
for -break-insert, and probably some others, this does not
look to be valid syntax.

I like your proposal of 
  bkpt={number="1", ... , locations=[{number="1.1", ...}, ...]}

which would allow to easily differentiate between the "main bp
entry" and the "sub entries".

Marc


> 
> Thanks,
> Mircea
> 
> [1] Commit f04df06ec3ee7785676ce4e5e2ee49cf73b286ab
> 
> 
> -- 
> 
> Intel GmbH
> Dornacher Strasse 1
> 85622 Feldkirchen/Muenchen, Deutschland
> Sitz der Gesellschaft: Feldkirchen bei Muenchen
> Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, 
> Douglas Lusk
> Registergericht: Muenchen HRB 47456
> Ust.-IdNr./VAT Registration No.: DE129385895
> Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052
> 
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]