This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Multiple breakpoints
- From: Nick Roberts <nickrob at snap dot net dot nz>
- To: gdb at sourceware dot org
- Date: Thu, 3 Apr 2008 20:53:24 +1200
- Subject: Multiple breakpoints
If I set a breakpoint on TRY_CATCH in gdb_evaluate_expression, I get
multiple breakpoints:
gdb_evaluate_expression (struct expression *exp, struct value **value)
{
volatile struct gdb_exception except;
-> TRY_CATCH (except, RETURN_MASK_ERROR)
{
*value = evaluate_expression(exp);
}
if (except.reason < 0)
return 0;
return 1;
}
where -> shows the breakpoint location.
Is this to be expected? The assembler looks like this:
0x081c04a1 <gdb_evaluate_expression+0>: push %ebp
0x081c04a2 <gdb_evaluate_expression+1>: mov %esp,%ebp
0x081c04a4 <gdb_evaluate_expression+3>: sub $0x28,%esp
-> 0x081c04a7 <gdb_evaluate_expression+6>: mov 0x83a55a0,%edx
0x081c04ad <gdb_evaluate_expression+12>: movl $0x2,0x8(%esp)
0x081c04b5 <gdb_evaluate_expression+20>: lea -0x10(%ebp),%eax
0x081c04b8 <gdb_evaluate_expression+23>: mov %eax,0x4(%esp)
0x081c04bc <gdb_evaluate_expression+27>: mov %edx,(%esp)
0x081c04bf <gdb_evaluate_expression+30>: call 0x814e660 <exce...
0x081c04c4 <gdb_evaluate_expression+35>: mov %eax,-0x4(%ebp)
0x081c04c7 <gdb_evaluate_expression+38>: mov -0x4(%ebp),%eax
0x081c04ca <gdb_evaluate_expression+41>: movl $0x1,0x4(%esp)
0x081c04d2 <gdb_evaluate_expression+49>: mov %eax,(%esp)
0x081c04d5 <gdb_evaluate_expression+52>: call 0x8089058 <__si...
0x081c04da <gdb_evaluate_expression+57>: jmp 0x81c04f7 <gdb_...
0x081c04dc <gdb_evaluate_expression+59>: mov 0x8(%ebp),%eax
0x081c04df <gdb_evaluate_expression+62>: mov %eax,(%esp)
0x081c04e2 <gdb_evaluate_expression+65>: call 0x810fc5e <eval...
0x081c04e7 <gdb_evaluate_expression+70>: mov %eax,%edx
0x081c04e9 <gdb_evaluate_expression+72>: mov 0xc(%ebp),%eax
0x081c04ec <gdb_evaluate_expression+75>: mov %edx,(%eax)
-> 0x081c04ee <gdb_evaluate_expression+77>: call 0x814e983 <exce...
0x081c04f3 <gdb_evaluate_expression+82>: test %eax,%eax
0x081c04f5 <gdb_evaluate_expression+84>: jne 0x81c04dc <gdb_...
0x081c04f7 <gdb_evaluate_expression+86>: call 0x814e96f <exce...
0x081c04fc <gdb_evaluate_expression+91>: test %eax,%eax
0x081c04fe <gdb_evaluate_expression+93>: jne 0x81c04ee <gdb_...
0x081c0500 <gdb_evaluate_expression+95>: mov -0x10(%ebp),%ea
0x081c0503 <gdb_evaluate_expression+98>: test %eax,%eax
0x081c0505 <gdb_evaluate_expression+100>: jns 0x81c0510 <gdb_...
0x081c0507 <gdb_evaluate_expression+102>: movl $0x0,-0x14(%ebp
0x081c050e <gdb_evaluate_expression+109>: jmp 0x81c0517 <gdb_...
0x081c0510 <gdb_evaluate_expression+111>: movl $0x1,-0x14(%ebp)
0x081c0517 <gdb_evaluate_expression+118>: mov -0x14(%ebp),%eax
0x081c051a <gdb_evaluate_expression+121>: leave
0x081c051b <gdb_evaluate_expression+122>: ret
End of assembler dump.
--
Nick http://www.inet.net.nz/~nickrob