Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Aleksandar Ristovski <aristovski@qnx.com>
To: gdb-patches@sources.redhat.com
Cc: Eli Zaretskii <eliz@gnu.org>
Subject: Re: [patch/MI] Implementation for break-catch command
Date: Mon, 02 Jun 2008 16:06:00 -0000	[thread overview]
Message-ID: <48441A6F.8020607@qnx.com> (raw)
In-Reply-To: <200805312006.11811.vladimir@codesourcery.com>

Vladimir Prus wrote:
> On Thursday 29 May 2008 18:48:36 Aleksandar Ristovski wrote:
>> Index: gdb/breakpoint.c
> 
> First of all, I would like a some testcases to be added with this patch.
> 
> I have some questions about behaviour, too:
> 
> 1. -break-catch throw
>    ^done,bkpt={number="3",type="breakpoint",disp="keep",enabled="y",
>                addr="0xb7ef6e05",what="exception throw",times="0",
>                original-location="__cxa_throw"}
>    (gdb)
> 
> The way this breakpoint is printed seems not sufficiently precise. Suppose
> such a breakpoint was added via CLI. GUI would like to detect this, and
> add a breakpoint to the breakpoint list as "catch" breakpoint. How can we
> detect it is a catch breakpoint? The "what" field appears to be of a fairly
> ad-hoc use in MI. 

A few questions:

This is the output from -break-list:

^done,BreakpointTable={nr_rows="3",nr_cols="6",hdr=[
{width="7",alignment="-1",col_name="number",colhdr="Num"},
{width="14",alignment="-1",col_name="type",colhdr="Type"},
{width="4",alignment="-1",col_name="disp",colhdr="Disp"},
{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},
{width="10",alignment="-1",col_name="addr",colhdr="Address"},
{width="40",alignment="2",col_name="what",colhdr="What"}],
body=[bkpt=
{number="1",type="breakpoint",disp="keep",enabled="y",addr="0x080488c4",func="main",file="/tmp/catch.cc",fullname="/tmp/catch.cc",line="9",times="0",original-location="main"},
...

The fields listed in the header do not match the body. Should they? What is the point of the header if rows can have just any field?

> Should the type of breakpoint be actually 'exception-throw'?
> 

I agree, 'breakpoint' is not precise. I think the type should be "catch " + event name, e.g. "catch catch", "catch throw" "catch signal" to keep terminology consistent (there are "catch load" "catch unload"...). 

Reason field (for stopped message) - I would suggest simply specifying the type again instead of introducing a new string, e.g. '*stopped,reason="catch catch"'.

Thanks,

Aleksandar


  parent reply	other threads:[~2008-06-02 16:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-28 20:59 Aleksandar Ristovski
2008-05-28 21:26 ` Vladimir Prus
2008-05-28 21:36   ` Aleksandar Ristovski
2008-05-28 23:10     ` Eli Zaretskii
2008-05-29 20:46       ` Aleksandar Ristovski
2008-05-29 20:52         ` Aleksandar Ristovski
     [not found] ` <200805312006.11811.vladimir@codesourcery.com>
     [not found]   ` <18497.57814.496794.333674@kahikatea.snap.net.nz>
2008-06-01  5:15     ` Vladimir Prus
2008-06-02 13:23       ` Aleksandar Ristovski
2008-06-02 14:40         ` Vladimir Prus
2008-06-02 16:06   ` Aleksandar Ristovski [this message]
2008-06-02 16:28     ` Vladimir Prus
2008-07-31 14:06       ` Aleksandar Ristovski

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=48441A6F.8020607@qnx.com \
    --to=aristovski@qnx.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sources.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