public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "andersonc0d3 at gmail dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/13508] gdb doesn't clean trap flag Date: Fri, 16 Dec 2011 03:11:00 -0000 [thread overview] Message-ID: <bug-13508-4717-WRQRfbOTcm@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-13508-4717@http.sourceware.org/bugzilla/> http://sourceware.org/bugzilla/show_bug.cgi?id=13508 --- Comment #1 from Anderson Eduardo <andersonc0d3 at gmail dot com> 2011-12-16 03:10:42 UTC --- Sorry lack of information, I pushed enter unintentionally. When I use pushf instruction, gdb set trap flag but doesn't clean when return to my program generating a SIGTRAP signal. (gdb) disass main Dump of assembler code for function main: 0x080483b4 <+0>: push %ebp 0x080483b5 <+1>: mov %esp,%ebp 0x080483b7 <+3>: pushf 0x080483b8 <+4>: popf 0x080483b9 <+5>: mov $0x0,%eax 0x080483be <+10>: pop %ebp 0x080483bf <+11>: ret End of assembler dump. (gdb) b *main+3 Breakpoint 1 at 0x80483b7: file trapflag.c, line 4. (gdb) r Starting program: /home/XXXXXX/Coding/asm/trapflag Breakpoint 1, main () at trapflag.c:4 4 asm("pushf;popf"); (gdb) p/x $eflags $1 = 0x246 (gdb) x/x $esp 0xbfd91b18: 0x00000000 (gdb) x/i $eip => 0x80483b7 <main+3>: pushf (gdb) ni 0x080483b8 4 asm("pushf;popf"); (gdb) x/x $esp 0xbfd91b14: 0x00000346 (gdb) x/i $eip => 0x80483b8 <main+4>: popf (gdb) ni 5 return 0; (gdb) p/x $eflags $2 = 0x346 (gdb) c Continuing. Program received signal SIGTRAP, Trace/breakpoint trap. main () at trapflag.c:6 6 } (gdb) -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
next prev parent reply other threads:[~2011-12-16 3:11 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-12-16 3:02 [Bug gdb/13508] New: " andersonc0d3 at gmail dot com 2011-12-16 3:11 ` andersonc0d3 at gmail dot com [this message] 2011-12-16 14:26 ` [Bug gdb/13508] " andersonc0d3 at gmail dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-13508-4717-WRQRfbOTcm@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).