Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Partial fix for PR breakpoints/10737: Make syscall info be per-arch instead of global
@ 2014-11-13  0:18 Sergio Durigan Junior
  2014-11-13  0:18 ` [PATCH 1/3] Making syscall information be per-arch, " Sergio Durigan Junior
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Sergio Durigan Junior @ 2014-11-13  0:18 UTC (permalink / raw)
  To: GDB Patches; +Cc: Pedro Alves, Gabriel Krisman Bertazi

Hello,

This patch series intends to partially fix PR breakpoints/10737, which
is about making the syscall information (for the "catch syscall"
command) be per-arch, instead of global.  This is not a full fix
because of the other issues pointed by Pedro here:

  <https://sourceware.org/bugzilla/show_bug.cgi?id=10737#c5>

However, I consider it a good step towards the real fix.  It will also
help me fix <https://sourceware.org/bugzilla/show_bug.cgi?id=17402>,
so I think it is good if the patch goes in.

What this patch does, basically, is move the "syscalls_info"
struct to gdbarch.  Currently, the syscall information is stored in a
global variable inside gdb/xml-syscall.c, which means that there is no
easy way to correlate this info with the current target or
architecture being used, for example.  This causes strange behaviors,
because the syscall info is not re-read when the arch changes.  For
example, if you put a syscall catchpoint in syscall 5 on i386 (syscall
open), and then load a x86_64 program on GDB and put the same syscall
5 there (fstat on x86_64), you will still see that GDB tells you that
it is catching "open", even though it is not.  With this patch, GDB
correctly says that it will be catching fstat syscalls.

As I said, there are still some problems on the "catch syscall"
mechanism, because (for example) the user should be able to "catch
syscall open" on i386, and then expect "open" to be caught also on
x86_64.  Currently, it doesn't work.  I intend to work on this later.

Anyway, I would like to know what you think about the current patch.
I guess it is simple enough to understand, and should not pose any
difficulties to be accepted (I expect).


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2014-11-20 17:34 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-13  0:18 [PATCH] Partial fix for PR breakpoints/10737: Make syscall info be per-arch instead of global Sergio Durigan Junior
2014-11-13  0:18 ` [PATCH 1/3] Making syscall information be per-arch, " Sergio Durigan Junior
2014-11-14 15:53   ` Pedro Alves
2014-11-14 23:17     ` Sergio Durigan Junior
2014-11-13  0:18 ` [PATCH 2/3] Adjust calls for setting "catch syscall" information Sergio Durigan Junior
2014-11-14 15:53   ` Pedro Alves
2014-11-14 23:18     ` Sergio Durigan Junior
2014-11-13  0:18 ` [PATCH 3/3] Testcase Sergio Durigan Junior
2014-11-14 15:54   ` Pedro Alves
2014-11-18  3:30     ` Sergio Durigan Junior
2014-11-18 15:13       ` Pedro Alves
2014-11-18 20:20         ` Sergio Durigan Junior
2014-11-19  9:23           ` PowerPC: "set architecture" -> "Architecture not recognized" ? (was: Re: [PATCH 3/3] Testcase) Pedro Alves
2014-11-19 18:46             ` PowerPC: "set architecture" -> "Architecture not recognized" ? Sergio Durigan Junior
2014-11-20 10:48               ` Pedro Alves
2014-11-20 17:20                 ` Sergio Durigan Junior
2014-11-20 17:34 ` [PATCH] Partial fix for PR breakpoints/10737: Make syscall info be per-arch instead of global Sergio Durigan Junior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox