digitalmars.D.learn - How to break gdb on D exception ?
- BBasile (21/21) Oct 01 2015 Currently it works fine when throwing with core.exception
- BBasile (2/3) Oct 01 2015 I meant: Does anyone master this ?
- Adam D. Ruppe (4/5) Oct 01 2015 give
Currently it works fine when throwing with core.exception functions 'onXXXX', like explained in the wiki, for example: --- break onFinalizeError --- But I can't manage to break when a new Exception instance is thrown in the code: --- throw new Exception("ouch"); --- none of the following GB commands work: --- catch catch catch throw catch signal all catch signal --- It looks like there are some tricks, like put a break on the vtbl of the base throwable class (no quite sure about this to be honest...) Does anyone manage this ?
Oct 01 2015
On Friday, 2 October 2015 at 03:58:45 UTC, BBasile wrote:Does anyone manage this ?I meant: Does anyone master this ?
Oct 01 2015
On Friday, 2 October 2015 at 03:58:45 UTC, BBasile wrote:none of the following GB commands work:give break d_throw or maybe `break d_throwc` a try
Oct 01 2015
On Friday, 2 October 2015 at 04:24:11 UTC, Adam D. Ruppe wrote:On Friday, 2 October 2015 at 03:58:45 UTC, BBasile wrote:unfortunately it doesn't work, i get --- (gdb) Function "d_throw"/"d_throwc" not defined.none of the following GB commands work:give break d_throw or maybe `break d_throwc` a try
Oct 01 2015
On Friday, 2 October 2015 at 04:46:51 UTC, BBasile wrote:On Friday, 2 October 2015 at 04:24:11 UTC, Adam D. Ruppe wrote:it was almost that actually, 'break _d_throwcOn Friday, 2 October 2015 at 03:58:45 UTC, BBasile wrote:unfortunately it doesn't work, i get --- (gdb) Function "d_throw"/"d_throwc" not defined.none of the following GB commands work:give break d_throw or maybe `break d_throwc` a try
Oct 01 2015
On Friday, 2 October 2015 at 04:50:59 UTC, BBasile wrote:On Friday, 2 October 2015 at 04:46:51 UTC, BBasile wrote:Or you could break on a specific exception class's constructor.On Friday, 2 October 2015 at 04:24:11 UTC, Adam D. Ruppe wrote:it was almost that actually, 'break _d_throwcOn Friday, 2 October 2015 at 03:58:45 UTC, BBasile wrote:unfortunately it doesn't work, i get --- (gdb) Function "d_throw"/"d_throwc" not defined.none of the following GB commands work:give break d_throw or maybe `break d_throwc` a try
Oct 02 2015
On Friday, 2 October 2015 at 09:15:13 UTC, Dmitri wrote:On Friday, 2 October 2015 at 04:50:59 UTC, BBasile wrote:This would be better. 1/ because I could propose a modifiable list of the exception kinds to track in the options). How can I do that, for example with FileException class ?On Friday, 2 October 2015 at 04:46:51 UTC, BBasile wrote:Or you could break on a specific exception class's constructor.On Friday, 2 October 2015 at 04:24:11 UTC, Adam D. Ruppe wrote:it was almost that actually, 'break _d_throwcOn Friday, 2 October 2015 at 03:58:45 UTC, BBasile wrote:unfortunately it doesn't work, i get --- (gdb) Function "d_throw"/"d_throwc" not defined.none of the following GB commands work:give break d_throw or maybe `break d_throwc` a try
Oct 04 2015
On Sunday, 4 October 2015 at 14:31:43 UTC, BBasile wrote:On Friday, 2 October 2015 at 09:15:13 UTC, Dmitri wrote:Ast visitor -> ThrowStatement -> detect class from token text -> break file:line ? Puting BP manally is not an option. I ask this for GDB integration in my IDE ;)On Friday, 2 October 2015 at 04:50:59 UTC, BBasile wrote:This would be better. 1/ because I could propose a modifiable list of the exception kinds to track in the options). happens. How can I do that, for example with FileException class ?On Friday, 2 October 2015 at 04:46:51 UTC, BBasile wrote:Or you could break on a specific exception class's constructor.On Friday, 2 October 2015 at 04:24:11 UTC, Adam D. Ruppe wrote:it was almost that actually, 'break _d_throwc[...]unfortunately it doesn't work, i get --- (gdb) Function "d_throw"/"d_throwc" not defined.
Oct 04 2015
On Sunday, 4 October 2015 at 14:31:43 UTC, BBasile wrote:On Friday, 2 October 2015 at 09:15:13 UTC, Dmitri wrote:Well, you look it up: info func FileException 0x00000000005ff7c4 std.file.FileException.this(const(char[]), const(char[]), immutable(char)[], ulong) 0x00000000005ff89c std.file.FileException.this(const(char[]), uint, immutable(char)[], ulong) 0x00000000006139ec std.stream.StreamFileException.this(immutable(char)[]) and then set either via a name or an address: b std.file.FileException.this or b *0x5ff7c4 with the difference that the name version potentially sets multiple breakpoints and moves it just after the frame setup code.On Friday, 2 October 2015 at 04:50:59 UTC, BBasile wrote:This would be better. 1/ because I could propose a modifiable list of the exception kinds to track in the options). happens. How can I do that, for example with FileException class ?On Friday, 2 October 2015 at 04:46:51 UTC, BBasile wrote:Or you could break on a specific exception class's constructor.On Friday, 2 October 2015 at 04:24:11 UTC, Adam D. Ruppe wrote:it was almost that actually, 'break _d_throwcOn Friday, 2 October 2015 at 03:58:45 UTC, BBasile wrote:unfortunately it doesn't work, i get --- (gdb) Function "d_throw"/"d_throwc" not defined.none of the following GB commands work:give break d_throw or maybe `break d_throwc` a try
Oct 05 2015