This is the mail archive of the archer@sourceware.org mailing list for the Archer 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]

Re: [PATCH 0/4] 'catch syscall' feature


Sérgio Durigan Júnior wrote:
For now the feature is only implemented for PPC32 and PPC64, but in a
future not so distant I intend to send patches for x86 and x86_64 too.


I looked at this patch, it looks great. Beyond the comments that others have added I have only a few small nitpick comments. As I cannot run this patch on my architecture, I'll have to guess a bit. What happens if a user attempts to use it without specific architecture support? What error message is written? The code that sets the breakpoint is:


+     Let's check if there's a syscall name. */
+
+  if (arg != NULL)
+    {
+      syscall_number = gdbarch_syscall_number_from_name (current_gdbarch,
+                                                         (const char *) arg);
+      if (syscall_number == UNKNOWN_SYSCALL)
+        error (_("Invalid syscall name '%s'."), arg);
+    }
+
+  /* Now let's create the catchpoint */
+  create_syscall_event_catchpoint (tempflag, syscall_number);


But if I were to run this say on x86. would it print "Invalid syscall name" for every (valid, but not implemented in GDB yet) syscall? If so, I think gate the feature with "not supported on your architecture" or some other message?


The other thing is, is this test included in the patch only gated to run on Linux architectures that have syscall support added into GDB?

Regards

Phil

I'm really looking forward to seeing this implemented n x86 and x864 ;)

Regards

Phil


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]