public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "sergiodj at redhat dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/10737] catch syscall name mappings (xml) should be per-arch or per-target, not global Date: Thu, 16 Oct 2014 04:03:00 -0000 [thread overview] Message-ID: <bug-10737-4717-eRPsGcJW87@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-10737-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=10737 --- Comment #4 from Sergio Durigan Junior <sergiodj at redhat dot com> --- BTW, the test needs to be different than what Pedro suggested. When you start GDB with an inferior, it sets the architecture correspondingly. Then, when you call "catch syscall", GDB loads the syscall names from the XML file related to the current architecture. Therefore, in this scenario, you *will* see the correct syscall, even if the inferior is not of the same architecture as your host. What this means is that triggering the bug is a bit simpler, and you don't even need an inferior for that (I discovered this while writing the testcase for the patch). For example, on i386 the "open" syscall is 5, but on x86_64 the "fstat" is 5. Therefore, to see the bug you can only do: (gdb) set architecture i386 The target architecture is assumed to be i386 (gdb) catch syscall 5 Catchpoint 1 (syscall 'open' [5]) (gdb) set architecture i386:x86-64 The target architecture is assumed to be i386:x86-64 (gdb) catch syscall 5 Catchpoint 2 (syscall 'open' [5]) With my patch: (gdb) set architecture i386 The target architecture is assumed to be i386 (gdb) catch syscall 5 Catchpoint 1 (syscall 'open' [5]) (gdb) set architecture i386:x86-64 The target architecture is assumed to be i386:x86-64 (gdb) catch syscall 5 Catchpoint 2 (syscall 'fstat' [5]) This is also the approach I will use to test the patch. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2014-10-16 4:03 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-10737-4717@http.sourceware.org/bugzilla/> 2014-10-08 19:10 ` sergiodj at redhat dot com 2014-10-13 0:23 ` sergiodj at redhat dot com 2014-10-16 4:03 ` sergiodj at redhat dot com [this message] 2014-10-17 11:44 ` palves at redhat dot com 2014-11-14 1:43 ` sergiodj at redhat dot com 2014-11-20 17:33 ` cvs-commit at gcc dot gnu.org 2014-11-20 18:35 ` cvs-commit at gcc dot gnu.org 2014-12-25 0:46 ` cvs-commit at gcc dot gnu.org 2009-10-06 10:44 [Bug gdb/10737] New: " pedro at codesourcery dot com 2009-10-06 10:53 ` [Bug gdb/10737] " pedro at codesourcery 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-10737-4717-eRPsGcJW87@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).