public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Catchpoint in GDB/MI
@ 2003-05-06 14:50 Alain Magloire
  2003-05-06 14:59 ` Daniel Jacobowitz
  0 siblings, 1 reply; 10+ messages in thread
From: Alain Magloire @ 2003-05-06 14:50 UTC (permalink / raw)
  To: gdb

Bonjour

	Anyone working on putting catchpoints in GDB/MI.
If yes what is the semantics.
If no what is the best semantic?  Completely OOB:

-catch load
^done
...

*stop,reason="shared-loaded",shared="libm.so"


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Catchpoint in GDB/MI
  2003-05-06 14:50 Catchpoint in GDB/MI Alain Magloire
@ 2003-05-06 14:59 ` Daniel Jacobowitz
  2003-05-06 15:16   ` Alain Magloire
       [not found]   ` <200305061516.LAA05153@node1.ott.qnx.com>
  0 siblings, 2 replies; 10+ messages in thread
From: Daniel Jacobowitz @ 2003-05-06 14:59 UTC (permalink / raw)
  To: Alain Magloire; +Cc: gdb

On Tue, May 06, 2003 at 10:50:47AM -0400, Alain Magloire wrote:
> Bonjour
> 
> 	Anyone working on putting catchpoints in GDB/MI.
> If yes what is the semantics.
> If no what is the best semantic?  Completely OOB:
> 
> -catch load
> ^done
> ...
> 
> *stop,reason="shared-loaded",shared="libm.so"

Do we even have any targets besides HP/UX where shared library
catchpoints _work_?  We need to fix them before we talk about their MI
syntax, IMO.  Similarly for most of the others.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Catchpoint in GDB/MI
  2003-05-06 14:59 ` Daniel Jacobowitz
@ 2003-05-06 15:16   ` Alain Magloire
       [not found]   ` <200305061516.LAA05153@node1.ott.qnx.com>
  1 sibling, 0 replies; 10+ messages in thread
From: Alain Magloire @ 2003-05-06 15:16 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb

> 
> On Tue, May 06, 2003 at 10:50:47AM -0400, Alain Magloire wrote:
> > Bonjour
> > 
> > 	Anyone working on putting catchpoints in GDB/MI.
> > If yes what is the semantics.
> > If no what is the best semantic?  Completely OOB:
> > 
> > -catch load
> > ^done
> > ...
> > 
> > *stop,reason="shared-loaded",shared="libm.so"
> 
> Do we even have any targets besides HP/UX where shared library
> catchpoints _work_?

Probably none, in the gdb source tree.  For example, catching exceptions
is probably compiler dependent 8-( .. I think.  Do remember Daniel Berlin
proposing a scheme for gcc long long time ago, could not retrace the email
though ... darn!

> We need to fix them before we talk about their MI
> syntax, IMO.  Similarly for most of the others.
> 

True, but there are a lot of MI commands that are define but
not implemented in the current tree or rather can not be implemented
in a clean way to be submit back.  So not all gdb/mi are equal depending
on the distribution.  But having the MI framework already in place is
a good step in normalizing(sp?).



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Catchpoint in GDB/MI
       [not found]   ` <200305061516.LAA05153@node1.ott.qnx.com>
@ 2003-05-06 15:31     ` Daniel Jacobowitz
  2003-05-06 16:12       ` Alain Magloire
       [not found]       ` <200305061612.MAA09299@node1.ott.qnx.com>
  0 siblings, 2 replies; 10+ messages in thread
From: Daniel Jacobowitz @ 2003-05-06 15:31 UTC (permalink / raw)
  To: Alain Magloire; +Cc: gdb

On Tue, May 06, 2003 at 11:15:50AM -0400, Alain Magloire wrote:
> > 
> > On Tue, May 06, 2003 at 10:50:47AM -0400, Alain Magloire wrote:
> > > Bonjour
> > > 
> > > 	Anyone working on putting catchpoints in GDB/MI.
> > > If yes what is the semantics.
> > > If no what is the best semantic?  Completely OOB:
> > > 
> > > -catch load
> > > ^done
> > > ...
> > > 
> > > *stop,reason="shared-loaded",shared="libm.so"
> > 
> > Do we even have any targets besides HP/UX where shared library
> > catchpoints _work_?
> 
> Probably none, in the gdb source tree.  For example, catching exceptions
> is probably compiler dependent 8-( .. I think.  Do remember Daniel Berlin
> proposing a scheme for gcc long long time ago, could not retrace the email
> though ... darn!

I've actually added catchpoints for exceptions back; but they'll just
show up as breakpoints for now.  If we want them to show up differently
someone's going to have to work out (both CLI and MI) what they should
look like.

> > We need to fix them before we talk about their MI
> > syntax, IMO.  Similarly for most of the others.
> > 
> 
> True, but there are a lot of MI commands that are define but
> not implemented in the current tree or rather can not be implemented
> in a clean way to be submit back.  So not all gdb/mi are equal depending
> on the distribution.  But having the MI framework already in place is
> a good step in normalizing(sp?).

I'm not sure that catchpoints _can_ be normalized.  The ones we have
now are mostly extremely system dependent.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Catchpoint in GDB/MI
  2003-05-06 15:31     ` Daniel Jacobowitz
@ 2003-05-06 16:12       ` Alain Magloire
       [not found]       ` <200305061612.MAA09299@node1.ott.qnx.com>
  1 sibling, 0 replies; 10+ messages in thread
From: Alain Magloire @ 2003-05-06 16:12 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb

> 
> On Tue, May 06, 2003 at 11:15:50AM -0400, Alain Magloire wrote:
> > > 
> > > On Tue, May 06, 2003 at 10:50:47AM -0400, Alain Magloire wrote:
> > > > Bonjour
> > > > 
> > > > 	Anyone working on putting catchpoints in GDB/MI.
> > > > If yes what is the semantics.
> > > > If no what is the best semantic?  Completely OOB:
> > > > 
> > > > -catch load
> > > > ^done
> > > > ...
> > > > 
> > > > *stop,reason="shared-loaded",shared="libm.so"
> > > 
> > > Do we even have any targets besides HP/UX where shared library
> > > catchpoints _work_?
> > 
> > Probably none, in the gdb source tree.  For example, catching exceptions
> > is probably compiler dependent 8-( .. I think.  Do remember Daniel Berlin
> > proposing a scheme for gcc long long time ago, could not retrace the email
> > though ... darn!
> 
> I've actually added catchpoints for exceptions back; but they'll just
> show up as breakpoints for now.  If we want them to show up differently
> someone's going to have to work out (both CLI and MI) what they should
> look like.
> 

Details please? 8-)

Do you mean setting breakpoint on some special function used to throw
exception __raise_exception(..)?

How does it work ?


> > > We need to fix them before we talk about their MI
> > > syntax, IMO.  Similarly for most of the others.
> > > 
> > 
> > True, but there are a lot of MI commands that are define but
> > not implemented in the current tree or rather can not be implemented
> > in a clean way to be submit back.  So not all gdb/mi are equal depending
> > on the distribution.  But having the MI framework already in place is
> > a good step in normalizing(sp?).
> 
> I'm not sure that catchpoints _can_ be normalized.  The ones we have
> now are mostly extremely system dependent.
> 

Yes and with this in mind, I would advocate to put the MI framework/commands
in place  even if they endup throwing "(not implemented)" on many platforms
or c++ compilers.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Catchpoint in GDB/MI
       [not found]       ` <200305061612.MAA09299@node1.ott.qnx.com>
@ 2003-05-06 16:45         ` Daniel Jacobowitz
  2003-05-06 19:46           ` Alain Magloire
       [not found]           ` <200305061946.PAA03660@node1.ott.qnx.com>
  0 siblings, 2 replies; 10+ messages in thread
From: Daniel Jacobowitz @ 2003-05-06 16:45 UTC (permalink / raw)
  To: Alain Magloire; +Cc: gdb

On Tue, May 06, 2003 at 12:12:10PM -0400, Alain Magloire wrote:
> > 
> > On Tue, May 06, 2003 at 11:15:50AM -0400, Alain Magloire wrote:
> > > > 
> > > > On Tue, May 06, 2003 at 10:50:47AM -0400, Alain Magloire wrote:
> > > > > Bonjour
> > > > > 
> > > > > 	Anyone working on putting catchpoints in GDB/MI.
> > > > > If yes what is the semantics.
> > > > > If no what is the best semantic?  Completely OOB:
> > > > > 
> > > > > -catch load
> > > > > ^done
> > > > > ...
> > > > > 
> > > > > *stop,reason="shared-loaded",shared="libm.so"
> > > > 
> > > > Do we even have any targets besides HP/UX where shared library
> > > > catchpoints _work_?
> > > 
> > > Probably none, in the gdb source tree.  For example, catching exceptions
> > > is probably compiler dependent 8-( .. I think.  Do remember Daniel Berlin
> > > proposing a scheme for gcc long long time ago, could not retrace the email
> > > though ... darn!
> > 
> > I've actually added catchpoints for exceptions back; but they'll just
> > show up as breakpoints for now.  If we want them to show up differently
> > someone's going to have to work out (both CLI and MI) what they should
> > look like.
> > 
> 
> Details please? 8-)
> 
> Do you mean setting breakpoint on some special function used to throw
> exception __raise_exception(..)?
> 
> How does it work ?

Yes.  It's __cxa_throw and __cxa_begin_catch; I only implemented them
for the GCC 3.x (i.e. multivendor) ABI.  You can find the patch in the
archives if you want to know more :)


> > > > We need to fix them before we talk about their MI
> > > > syntax, IMO.  Similarly for most of the others.
> > > > 
> > > 
> > > True, but there are a lot of MI commands that are define but
> > > not implemented in the current tree or rather can not be implemented
> > > in a clean way to be submit back.  So not all gdb/mi are equal depending
> > > on the distribution.  But having the MI framework already in place is
> > > a good step in normalizing(sp?).
> > 
> > I'm not sure that catchpoints _can_ be normalized.  The ones we have
> > now are mostly extremely system dependent.
> > 
> 
> Yes and with this in mind, I would advocate to put the MI framework/commands
> in place  even if they endup throwing "(not implemented)" on many platforms
> or c++ compilers.

My point is that the available information and semantics will vary a
lot.  For instance, which frame you're in when you hit them, et cetera.

Perhaps you're right.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Catchpoint in GDB/MI
  2003-05-06 16:45         ` Daniel Jacobowitz
@ 2003-05-06 19:46           ` Alain Magloire
       [not found]           ` <200305061946.PAA03660@node1.ott.qnx.com>
  1 sibling, 0 replies; 10+ messages in thread
From: Alain Magloire @ 2003-05-06 19:46 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb

> 
> On Tue, May 06, 2003 at 12:12:10PM -0400, Alain Magloire wrote:
> > > 
> > > On Tue, May 06, 2003 at 11:15:50AM -0400, Alain Magloire wrote:
> > > > > 
> > > > > On Tue, May 06, 2003 at 10:50:47AM -0400, Alain Magloire wrote:
> > > > > > Bonjour
> > > > > > 
> > > > > > 	Anyone working on putting catchpoints in GDB/MI.
> > > > > > If yes what is the semantics.
> > > > > > If no what is the best semantic?  Completely OOB:
> > > > > > 
> > > > > > -catch load
> > > > > > ^done
> > > > > > ...
> > > > > > 
> > > > > > *stop,reason="shared-loaded",shared="libm.so"
> > > > > 
> > > > > Do we even have any targets besides HP/UX where shared library
> > > > > catchpoints _work_?
> > > > 
> > > > Probably none, in the gdb source tree.  For example, catching exceptions
> > > > is probably compiler dependent 8-( .. I think.  Do remember Daniel Berlin
> > > > proposing a scheme for gcc long long time ago, could not retrace the email
> > > > though ... darn!
> > > 
> > > I've actually added catchpoints for exceptions back; but they'll just
> > > show up as breakpoints for now.  If we want them to show up differently
> > > someone's going to have to work out (both CLI and MI) what they should
> > > look like.
> > > 
> > 
> > Details please? 8-)
> > 
> > Do you mean setting breakpoint on some special function used to throw
> > exception __raise_exception(..)?
> > 
> > How does it work ?
> 
> Yes.  It's __cxa_throw and __cxa_begin_catch; I only implemented them
> for the GCC 3.x (i.e. multivendor) ABI.  You can find the patch in the
> archives if you want to know more :)
> 

Are you refering to this:
	http://sources.redhat.com/ml/gdb/2002-07/msg00191.html

Very informative, thanks.

Reading your exchange, I probably can implement your scheme whithout
having to change gdb; setting the breakpoint in __cxa_throw and examining
the arguments.

It seems straightforward enough, so why not put it in gdb?  Unless
of course I do not grasp the entire complexity of the problem 8-)
True it is compiler specific unless the cxxabi becomes more widespread
but at least a start.

> 
> > > > > We need to fix them before we talk about their MI
> > > > > syntax, IMO.  Similarly for most of the others.
> > > > > 
> > > > 
> > > > True, but there are a lot of MI commands that are define but
> > > > not implemented in the current tree or rather can not be implemented
> > > > in a clean way to be submit back.  So not all gdb/mi are equal depending
> > > > on the distribution.  But having the MI framework already in place is
> > > > a good step in normalizing(sp?).
> > > 
> > > I'm not sure that catchpoints _can_ be normalized.  The ones we have
> > > now are mostly extremely system dependent.
> > > 
> > 
> > Yes and with this in mind, I would advocate to put the MI framework/commands
> > in place  even if they endup throwing "(not implemented)" on many platforms
> > or c++ compilers.
> 
> My point is that the available information and semantics will vary a
> lot.  For instance, which frame you're in when you hit them, et cetera.
> 
> Perhaps you're right.
> 
> -- 
> Daniel Jacobowitz
> MontaVista Software                         Debian GNU/Linux Developer
> 


-- 
au revoir, alain
----
Aussi haut que l'on soit assis, on est toujours assis que sur son cul !!!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Catchpoint in GDB/MI
       [not found]           ` <200305061946.PAA03660@node1.ott.qnx.com>
@ 2003-05-06 19:52             ` Daniel Jacobowitz
  2003-05-06 21:21               ` Alain Magloire
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel Jacobowitz @ 2003-05-06 19:52 UTC (permalink / raw)
  To: Alain Magloire; +Cc: gdb

On Tue, May 06, 2003 at 03:46:40PM -0400, Alain Magloire wrote:
> > 
> > On Tue, May 06, 2003 at 12:12:10PM -0400, Alain Magloire wrote:
> > > > 
> > > > On Tue, May 06, 2003 at 11:15:50AM -0400, Alain Magloire wrote:
> > > > > > 
> > > > > > On Tue, May 06, 2003 at 10:50:47AM -0400, Alain Magloire wrote:
> > > > > > > Bonjour
> > > > > > > 
> > > > > > > 	Anyone working on putting catchpoints in GDB/MI.
> > > > > > > If yes what is the semantics.
> > > > > > > If no what is the best semantic?  Completely OOB:
> > > > > > > 
> > > > > > > -catch load
> > > > > > > ^done
> > > > > > > ...
> > > > > > > 
> > > > > > > *stop,reason="shared-loaded",shared="libm.so"
> > > > > > 
> > > > > > Do we even have any targets besides HP/UX where shared library
> > > > > > catchpoints _work_?
> > > > > 
> > > > > Probably none, in the gdb source tree.  For example, catching exceptions
> > > > > is probably compiler dependent 8-( .. I think.  Do remember Daniel Berlin
> > > > > proposing a scheme for gcc long long time ago, could not retrace the email
> > > > > though ... darn!
> > > > 
> > > > I've actually added catchpoints for exceptions back; but they'll just
> > > > show up as breakpoints for now.  If we want them to show up differently
> > > > someone's going to have to work out (both CLI and MI) what they should
> > > > look like.
> > > > 
> > > 
> > > Details please? 8-)
> > > 
> > > Do you mean setting breakpoint on some special function used to throw
> > > exception __raise_exception(..)?
> > > 
> > > How does it work ?
> > 
> > Yes.  It's __cxa_throw and __cxa_begin_catch; I only implemented them
> > for the GCC 3.x (i.e. multivendor) ABI.  You can find the patch in the
> > archives if you want to know more :)
> > 
> 
> Are you refering to this:
> 	http://sources.redhat.com/ml/gdb/2002-07/msg00191.html
> 
> Very informative, thanks.
> 
> Reading your exchange, I probably can implement your scheme whithout
> having to change gdb; setting the breakpoint in __cxa_throw and examining
> the arguments.
> 
> It seems straightforward enough, so why not put it in gdb?  Unless
> of course I do not grasp the entire complexity of the problem 8-)
> True it is compiler specific unless the cxxabi becomes more widespread
> but at least a start.

No, I was referring to the message a few weeks ago where I checked in
support for "catch catch".  It doesn't yet parse a type to catch but
that is easy to add once the FETCH_POINTER_ARGUMENT method is
available.

Alain, something is wrong with your mailer; I'm getting two copies with
different Message-Id's of everything you send me.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Catchpoint in GDB/MI
  2003-05-06 19:52             ` Daniel Jacobowitz
@ 2003-05-06 21:21               ` Alain Magloire
  2003-05-06 21:28                 ` Daniel Jacobowitz
  0 siblings, 1 reply; 10+ messages in thread
From: Alain Magloire @ 2003-05-06 21:21 UTC (permalink / raw)
  To: gdb

> > 
> > Are you refering to this:
> > 	http://sources.redhat.com/ml/gdb/2002-07/msg00191.html
> > 
> > Very informative, thanks.
> > 
> > Reading your exchange, I probably can implement your scheme whithout
> > having to change gdb; setting the breakpoint in __cxa_throw and examining
> > the arguments.
> > 
> > It seems straightforward enough, so why not put it in gdb?  Unless
> > of course I do not grasp the entire complexity of the problem 8-)
> > True it is compiler specific unless the cxxabi becomes more widespread
> > but at least a start.
> 
> No, I was referring to the message a few weeks ago where I checked in
> support for "catch catch".  It doesn't yet parse a type to catch but
> that is easy to add once the FETCH_POINTER_ARGUMENT method is
> available.
> 

Ho! I see it now:
	http://sources.redhat.com/ml/gdb-patches/2003-04/msg00507.html

Very cool! indeed.

>  It doesn't yet parse a type to catch but
> that is easy to add once the FETCH_POINTER_ARGUMENT method is
> available.

Darn!! so close .. 8)
Any ETA ?

It will probably need the MI/wrappers too.

Thanks for the pointers, lots of things to chew on.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Catchpoint in GDB/MI
  2003-05-06 21:21               ` Alain Magloire
@ 2003-05-06 21:28                 ` Daniel Jacobowitz
  0 siblings, 0 replies; 10+ messages in thread
From: Daniel Jacobowitz @ 2003-05-06 21:28 UTC (permalink / raw)
  To: Alain Magloire; +Cc: gdb

On Tue, May 06, 2003 at 05:21:41PM -0400, Alain Magloire wrote:
> > > 
> > > Are you refering to this:
> > > 	http://sources.redhat.com/ml/gdb/2002-07/msg00191.html
> > > 
> > > Very informative, thanks.
> > > 
> > > Reading your exchange, I probably can implement your scheme whithout
> > > having to change gdb; setting the breakpoint in __cxa_throw and examining
> > > the arguments.
> > > 
> > > It seems straightforward enough, so why not put it in gdb?  Unless
> > > of course I do not grasp the entire complexity of the problem 8-)
> > > True it is compiler specific unless the cxxabi becomes more widespread
> > > but at least a start.
> > 
> > No, I was referring to the message a few weeks ago where I checked in
> > support for "catch catch".  It doesn't yet parse a type to catch but
> > that is easy to add once the FETCH_POINTER_ARGUMENT method is
> > available.
> > 
> 
> Ho! I see it now:
> 	http://sources.redhat.com/ml/gdb-patches/2003-04/msg00507.html
> 
> Very cool! indeed.
> 
> >  It doesn't yet parse a type to catch but
> > that is easy to add once the FETCH_POINTER_ARGUMENT method is
> > available.
> 
> Darn!! so close .. 8)
> Any ETA ?

Nope, too much else to do.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-05-06 21:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-06 14:50 Catchpoint in GDB/MI Alain Magloire
2003-05-06 14:59 ` Daniel Jacobowitz
2003-05-06 15:16   ` Alain Magloire
     [not found]   ` <200305061516.LAA05153@node1.ott.qnx.com>
2003-05-06 15:31     ` Daniel Jacobowitz
2003-05-06 16:12       ` Alain Magloire
     [not found]       ` <200305061612.MAA09299@node1.ott.qnx.com>
2003-05-06 16:45         ` Daniel Jacobowitz
2003-05-06 19:46           ` Alain Magloire
     [not found]           ` <200305061946.PAA03660@node1.ott.qnx.com>
2003-05-06 19:52             ` Daniel Jacobowitz
2003-05-06 21:21               ` Alain Magloire
2003-05-06 21:28                 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).