From: Michael Snyder <msnyder@vmware.com>
To: Hui Zhu <teawater@gmail.com>
Cc: gdb-patches ml <gdb-patches@sourceware.org>
Subject: Re: [RFA/RFC Prec] Add Linux AMD64 process record support second version, (64 bits system call support) 2/3
Date: Mon, 13 Jul 2009 02:26:00 -0000 [thread overview]
Message-ID: <4A5A82F9.5050503@vmware.com> (raw)
In-Reply-To: <daef60380907061939g67bba874ydbc000c9b0033f7e@mail.gmail.com>
Hui Zhu wrote:
> The old linux-record.c just support 32 bits system call and some other
> problem. This patch fix them all.
>
> 2009-07-07 Hui Zhu <teawater@gmail.com>
>
> Add process record Linux system call 64 bits support.
>
> * linux-record.h (linux_record_tdep): Add size_pointer,
> size_size_t, size_iovec and arg6.
> * i386-linux-tdep.c (i386_linux_init_abi): Ditto.
> (i386_linux_intx80_sysenter_record): Add a check for system
> call number.
> * linux-record.c (record_linux_system_call): Make this
> function support 64 bits.
Again, preliminary, mostly whitespace formatting comments.
> @@ -371,8 +371,15 @@ i386_linux_intx80_sysenter_record (struc
>
> regcache_raw_read (regcache, I386_EAX_REGNUM, (gdb_byte *)&tmpu32);
>
> + if (tmpu32 > 499)
> + {
> + printf_unfiltered (_("Process record and replay target doesn't "
> + "support syscall number %u\n"), tmpu32);
> + return -1;
> + }
> +
> ret = record_linux_system_call (tmpu32, regcache,
> - &i386_linux_record_tdep);
> + &i386_linux_record_tdep);
This line is just a change between spaces and tabs.
We like to have whitespace-only changes submitted separately.
Just add -w and/or -b to your diff flags, and these will disappear.
> @@ -481,6 +488,7 @@ i386_linux_init_abi (struct gdbarch_info
> /* Initialize the i386_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. */
> + i386_linux_record_tdep.size_pointer = 4;
Can't you use gdbarch_ptr_bit(gdbarch) for this?
Just trying to avoid duplication.
> +
> + a = alloca (tdep->size_int);
> +
> + if (record_arch_list_add_mem ((CORE_ADDR)len, tdep->size_int))
> + return -1;
> +
> + /* Get the addrlen. */
> + if (target_read_memory ((CORE_ADDR)len, a, tdep->size_int))
Space after cast. There are a whole lot like this in this file.
> + {
> + if (record_debug)
> + fprintf_unfiltered (gdb_stdlog,
> + "Process record: error reading "
> + "memory at addr = 0x%s len = %d.\n",
> + phex_nz (len, tdep->size_pointer),
> + tdep->size_int);
> + return -1;
> + }
> + addrlen = (int)extract_unsigned_integer(a, tdep->size_int, byte_order);
Space after function name. And after cast.
Search for "extract_unsigned_integer", there are several like this.
next prev parent reply other threads:[~2009-07-13 0:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-07 2:40 Hui Zhu
2009-07-13 2:26 ` Michael Snyder [this message]
2009-07-17 12:03 ` Hui Zhu
2009-07-18 3:04 ` Michael Snyder
2009-07-19 17:39 ` Hui Zhu
2009-07-26 7:46 ` Michael Snyder
2009-07-28 1:44 ` Hui Zhu
2009-08-03 5:40 ` Hui Zhu
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=4A5A82F9.5050503@vmware.com \
--to=msnyder@vmware.com \
--cc=gdb-patches@sourceware.org \
--cc=teawater@gmail.com \
/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: link
Be 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