This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/RFC Prec] Add Linux AMD64 process record support second version, (AMD64 Linux system call support) 3/3
- From: Michael Snyder <msnyder at vmware dot com>
- To: Hui Zhu <teawater at gmail dot com>
- Cc: gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Sun, 12 Jul 2009 17:47:52 -0700
- Subject: Re: [RFA/RFC Prec] Add Linux AMD64 process record support second version, (AMD64 Linux system call support) 3/3
- References: <daef60380907061940l6625d38p6b1a03a9527565ab@mail.gmail.com>
Hui Zhu wrote:
Add prec support like i386-linux-tdep.c.
2009-07-07 Hui Zhu <teawater@gmail.com>
Add Linux AMD64 process record support.
* amd64-linux-tdep.c (amd64_linux_record_tdep): New variable.
This struct has the argument for the function
"record_linux_system_call".
(amd64_linux_syscall_record): New function. Parse the
system call instruction and call function
"record_linux_system_call" to record execute log.
(i386_linux_init_abi): Initialize "amd64_linux_record_tdep".
Set "amd64_linux_syscall_record" to "i386_syscall_record".
Once again, just a preliminary review.
Same comments about space-after-cast etc.
+ /* Covent tmpulongest to number in record_linux_system_call. */
"Convert", maybe?
+ /* Initialize the amd64_linux_record_tdep. */
+ /* These values are the size of the type that will be used in a system
+ call. They are obtained from Linux Kernel source. */
+ amd64_linux_record_tdep.size_pointer = 8;
Can you use gdbarch_ptr_bit (gdbarch)?
+ amd64_linux_record_tdep.size_int = 4;
+ amd64_linux_record_tdep.size_long = 8;
+ amd64_linux_record_tdep.size_ulong = 8;
And again, aren't these sizes also in the gdbarch?
Do we need to duplicate them here?