This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, this patch attempts to call prevent_dont_repeat when running breakpoint commands so that in the following stuff, when hitting breakpoint 2, hitting enter will repeat 'c' even though the commands specified in the breakpoint call things which call dont_repeat. I'm not sure the idea is entirely unobjectionable, so before i spend time trying to make test cases and stuff, here's the patch. ignore all the cannot access memory address stuff, the important things are the "(gdb) Continuing.", and (gdb) (gdb) c IIUC the do_cleanups(oldchain); at the end should unprevent don't repeats. 2011-04-21 Matt Rice <ratmice@gmail.com> * breakpoint.c (bpstat_do_actions_1): call prevent_dont_repeat. -------------------- before -------------------- (gdb) break main Breakpoint 1 at 0x400490: file test.c, line 8. (gdb) break bp1 Breakpoint 2 at 0x400478: file test.c, line 1. (gdb) break bp2 Breakpoint 3 at 0x40047e: file test.c, line 2. (gdb) commands 2 Type commands for breakpoint(s) 2, one per line. End with a line saying just "end". >add-symbol-file test 0xabadc0ff >end (gdb) r Starting program: /home/ratmice/tests/test Breakpoint 1, main () at test.c:8 8 bp1(); Missing separate debuginfos, use: debuginfo-install glibc-2.13-1.x86_64 (gdb) c Continuing. Breakpoint 2, bp1 () at test.c:1 1 void bp1() {} add symbol table from file "test" at .text_addr = 0xabadc0ff Error in re-setting breakpoint 1: Cannot access memory at address 0xabadc1fb Error in re-setting breakpoint 2: Cannot access memory at address 0xabadc1e3 Error in re-setting breakpoint 3: Cannot access memory at address 0xabadc1e9 Error in re-setting breakpoint 4: Cannot access memory at address 0xabadc1ef Error in re-setting breakpoint 5: Cannot access memory at address 0xabadc1f5 (gdb) (gdb) c Continuing. Breakpoint 3, bp2 () at test.c:2 2 void bp2() {} ------------------- after ------------------- (gdb) break bp1 Breakpoint 1 at 0x400478: file test.c, line 1. (gdb) break bp2 Breakpoint 2 at 0x40047e: file test.c, line 2. (gdb) break bp3 Breakpoint 3 at 0x400484: file test.c, line 3. (gdb) break bp4 Breakpoint 4 at 0x40048a: file test.c, line 4. (gdb) commands 2 Type commands for breakpoint(s) 2, one per line. End with a line saying just "end". >add-symbol-file test 0xabadc0ff >end (gdb) r Starting program: /home/ratmice/tests/test Breakpoint 1, bp1 () at test.c:1 1 void bp1() {} (gdb) c Continuing. Breakpoint 2, bp2 () at test.c:2 2 void bp2() {} add symbol table from file "test" at .text_addr = 0xabadc0ff Error in re-setting breakpoint 1: Cannot access memory at address 0xabadc1e3 Error in re-setting breakpoint 2: Cannot access memory at address 0xabadc1e9 Error in re-setting breakpoint 3: Cannot access memory at address 0xabadc1ef Error in re-setting breakpoint 4: Cannot access memory at address 0xabadc1f5 (gdb) Continuing. Breakpoint 3, bp3 () at test.c:3 3 void bp3() {} (gdb) add-symbol-file test 0xabadc0ff add symbol table from file "test" at .text_addr = 0xabadc0ff (y or n) y Reading symbols from /home/ratmice/tests/test...done. Error in re-setting breakpoint 1: Cannot access memory at address 0xabadc1e3 Error in re-setting breakpoint 2: Cannot access memory at address 0xabadc1e9 Error in re-setting breakpoint 3: Cannot access memory at address 0xabadc1ef Error in re-setting breakpoint 4: Cannot access memory at address 0xabadc1f5 (gdb) (gdb) c Continuing.
Attachment:
foo.diff
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |