can I have gdb break on the label "gdbStatement:" in this example Code:
我可以在此示例代码中的标签“gdbStatement:”上使用gdb break吗?
...
...
op1 = op2 = op3 = op4 = nil;
op1 = [ops firstObject];
if(jj>1)op2 = [ops oai:1];
if(jj>2)op3 = [ops oai:2];
if(jj>3)op4 = [ops oai:3];
gdbStatement:
// Wertzuweisungen
if([stmt isZuweisung]){
// ausser bei mutable Targets, die erweitert werden oder im Fehlerfall hier drin kein continue, weil am Ende s1 weiterverarbeitet wird;
NSString *val1,*s1;
double varVal=0;
...
...
I know how to break on line numbers and functions. But can't find how to break on labels.
我知道如何打破行号和功能。但是找不到如何打破标签。
1 个解决方案
#1
0
FSF or apple gdb? The below applies to FSF gdb.
FSF还是苹果gdb?以下适用于FSF gdb。
Assuming that the code is in a method, there appears to be no way to specify a breakpoint on a label in a method,
假设代码在方法中,似乎无法在方法中的标签上指定断点,
The syntax for specifying a breakpoint on a label is break function:label but the Objective-C linespec parser in FSF gdb does not parse this, so break -[aClass aMethod]:aLabel doesn't work
在标签上指定断点的语法是break函数:label但是FSF gdb中的Objective-C linespec解析器不会解析它,所以break - [aClass aMethod]:aLabel不起作用
One could reasonably assume that you could mangle the method specify a function breakpoint on the symbol name, like 'break _i_aClass__aMethod:label', but that doesn't currently work either for a reason I do not yet understand.
可以合理地假设你可以破坏方法在符号名称上指定一个函数断点,比如'break _i_aClass__aMethod:label',但是由于我还不了解的原因,这当前不起作用。
tried with gdb 7.3 and 7.6.
尝试使用gdb 7.3和7.6。
#1
0
FSF or apple gdb? The below applies to FSF gdb.
FSF还是苹果gdb?以下适用于FSF gdb。
Assuming that the code is in a method, there appears to be no way to specify a breakpoint on a label in a method,
假设代码在方法中,似乎无法在方法中的标签上指定断点,
The syntax for specifying a breakpoint on a label is break function:label but the Objective-C linespec parser in FSF gdb does not parse this, so break -[aClass aMethod]:aLabel doesn't work
在标签上指定断点的语法是break函数:label但是FSF gdb中的Objective-C linespec解析器不会解析它,所以break - [aClass aMethod]:aLabel不起作用
One could reasonably assume that you could mangle the method specify a function breakpoint on the symbol name, like 'break _i_aClass__aMethod:label', but that doesn't currently work either for a reason I do not yet understand.
可以合理地假设你可以破坏方法在符号名称上指定一个函数断点,比如'break _i_aClass__aMethod:label',但是由于我还不了解的原因,这当前不起作用。
tried with gdb 7.3 and 7.6.
尝试使用gdb 7.3和7.6。