Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* catching exception in gdb
@ 2004-07-08 22:43 Alain Magloire
  2004-07-08 22:58 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Alain Magloire @ 2004-07-08 22:43 UTC (permalink / raw)
  To: gdb


Bonjour

  As suggested in the gdb doc, I was doing some hackish stuff in gdb-5.x to get catching exception working
in the eclipse CDT IDE.  Using the C++ ABI and putting a "hidden" breakpoint in the "__cxa_xxx" functions.
So far so good, but once stop how to extract the class deep in the internal of the ABI.
I could not fine any ABI functions to do this nor walking through the arguments.

Any suggestions ?

gdb-6.x commands
  catch throw <exceptname>  - a particular exception, when thrown
  catch catch <exceptname>  - a particular exception, when caught
do not seem to work

(gdb) catch catch Size
Junk at end of arguments. 



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

* Re: catching exception in gdb
  2004-07-08 22:43 catching exception in gdb Alain Magloire
@ 2004-07-08 22:58 ` Daniel Jacobowitz
  2004-07-08 23:18   ` Alain Magloire
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2004-07-08 22:58 UTC (permalink / raw)
  To: Alain Magloire; +Cc: gdb

On Thu, Jul 08, 2004 at 06:43:17PM -0400, Alain Magloire wrote:
> 
> Bonjour
> 
>   As suggested in the gdb doc, I was doing some hackish stuff in gdb-5.x to get catching exception working
> in the eclipse CDT IDE.  Using the C++ ABI and putting a "hidden" breakpoint in the "__cxa_xxx" functions.
> So far so good, but once stop how to extract the class deep in the internal of the ABI.
> I could not fine any ABI functions to do this nor walking through the arguments.
> 
> Any suggestions ?
> 
> gdb-6.x commands
>   catch throw <exceptname>  - a particular exception, when thrown
>   catch catch <exceptname>  - a particular exception, when caught
> do not seem to work
> 
> (gdb) catch catch Size
> Junk at end of arguments. 

You can do it with the runtime type information, but I never got around
to implementing it.  It's fairly simple.

"catch catch" and "catch throw" only work without arguments at the
moment.

-- 
Daniel Jacobowitz


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

* Re: catching exception in gdb
  2004-07-08 22:58 ` Daniel Jacobowitz
@ 2004-07-08 23:18   ` Alain Magloire
  0 siblings, 0 replies; 3+ messages in thread
From: Alain Magloire @ 2004-07-08 23:18 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Alain Magloire, gdb

> 
> On Thu, Jul 08, 2004 at 06:43:17PM -0400, Alain Magloire wrote:
> > 
> > Bonjour
> > 
> >   As suggested in the gdb doc, I was doing some hackish stuff in gdb-5.x to get catching exception working
> > in the eclipse CDT IDE.  Using the C++ ABI and putting a "hidden" breakpoint in the "__cxa_xxx" functions.
> > So far so good, but once stop how to extract the class deep in the internal of the ABI.
> > I could not fine any ABI functions to do this nor walking through the arguments.
> > 
> > Any suggestions ?
> > 
> > gdb-6.x commands
> >   catch throw <exceptname>  - a particular exception, when thrown
> >   catch catch <exceptname>  - a particular exception, when caught
> > do not seem to work
> > 
> > (gdb) catch catch Size
> > Junk at end of arguments. 
> 
> You can do it with the runtime type information, but I never got around
> to implementing it.  It's fairly simple.
> 

Sir ... You have my complete attention.
I like the sound of "it's fairly simple" ...
But I've learned the hard way, nothing is simple when dealing with gdb 8-).
So any good pointers ... been hamering away typecasting pointers to get the damn clazz name ... no go.

> "catch catch" and "catch throw" only work without arguments at the
> moment.
> 

Noted.


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

end of thread, other threads:[~2004-07-08 23:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-08 22:43 catching exception in gdb Alain Magloire
2004-07-08 22:58 ` Daniel Jacobowitz
2004-07-08 23:18   ` Alain Magloire

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox