From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: cole945@gmail.com (Wei-cheng Wang)
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/3 v3] Process record support for PowerPC
Date: Wed, 17 Dec 2014 18:41:00 -0000 [thread overview]
Message-ID: <201412171841.sBHIfGSA011030@d03av02.boulder.ibm.com> (raw)
In-Reply-To: <5491B840.5030603@gmail.com> from "Wei-cheng Wang" at Dec 18, 2014 01:07:12 AM
Wei-cheng Wang wrote:
> 2014-12-06 Wei-cheng Wang <cole945@gmail.com>
> Ulrich Weigand <uweigand@de.ibm.com>
>
> * configure.tgt (powerpc*-*-linux): Add linux-record.o to
> gdb_target_obs.
> (ppc_linux_record_tdep, ppc64_linux_record_tdep): New for linux syscall
> record.
> (ppc_canonicalize_syscall, ppc_linux_syscall_record,
> ppc_linux_record_signal, ppc_init_linux_record_tdep): New functions.
> (ppc_linux_init_abi): Set process_record, process_record_signal.
> * ppc-tdep.h (struct gdbarch_tdep): Add ppc_syscall_record and
> ppc_linux_record_tdep to gdbarch_tdep.
> (ppc_process_record): New declaration.
> * rs6000-tdep.c (ppc_record_vsr, ppc_process_record_op4,
> ppc_process_record_op19, ppc_process_record_op31,
> ppc_process_record_op59, ppc_process_record_op60,
> ppc_process_record_op63, ppc_process_record): New functions.
>
> changelog for testsuite
>
> 2014-12-06 Wei-cheng Wang <cole945@gmail.com>
>
> * lib/gdb.exp (supports_process_record): Return true for
> powerpc*-*-linux*.
> (supports_reverse): Likewise.
This looks all very good now, except that:
> +static void
> +ppc_init_linux_record_tdep (struct linux_record_tdep *record_tdep,
> + int wordsize)
> +{
> + /* Simply return if it had been initialized. */
> + if (record_tdep->size_pointer != 0)
> + return;
> +
> + /* These values are the size of the type that will be used in a system
> + call. They are obtained from Linux Kernel source. */
> +
> + record_tdep->size_pointer = wordsize;
> + record_tdep->size__old_kernel_stat = 32;
> + record_tdep->size_tms = 32;
> + record_tdep->size_loff_t = 8;
> + record_tdep->size_flock = 32;
[...]
you seem to have removed all the 32-bit struct sizes here. Your last
iteration had different values for many of those structs for wordsize 4
vs. wordsize 8, and I think we need to keep them.
I had suggested to remove the gdbarch calls, but I was thinking instead
of a structure along the lines of
if (wordsize == 8)
{
record_tdep->size_pointer = 8;
record_tdep->size__old_kernel_stat = 32;
record_tdep->size_tms = 32;
record_tdep->size_loff_t = 8;
record_tdep->size_flock = 32;
[...]
}
else if (wordsize == 4)
{
record_tdep->size_pointer = 4;
record_tdep->size__old_kernel_stat = 32;
record_tdep->size_tms = 16;
record_tdep->size_loff_t = 8;
record_tdep->size_flock = 16;
[...]
}
else
internal_error (__FILE__, __LINE_, _("unexpected wordsize"));
The patch is OK with that change.
Thanks again,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2014-12-17 18:41 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-06 18:00 [PATCH 2/3 v2] " Wei-cheng Wang
2014-12-08 19:12 ` Ulrich Weigand
2014-12-17 17:07 ` [PATCH 2/3 v3] " Wei-cheng Wang
2014-12-17 18:41 ` Ulrich Weigand [this message]
2014-12-25 17:27 ` [PATCH 2/3 v4] " Wei-cheng Wang
2015-01-01 14:19 ` Ulrich Weigand
2015-01-04 16:27 ` Wei-cheng Wang
2015-01-06 12:42 ` Ulrich Weigand
2015-01-17 6:02 ` Wei-cheng Wang
2015-01-17 11:47 ` Ulrich Weigand
2015-01-17 18:53 ` Joel Brobecker
2015-01-17 21:20 ` Broken build: rs6000-tdep.c: 32-bit host --enable-targets=all --enable-64-bit-bfd [Re: [PATCH 2/3 v4] Process record support for PowerPC] Jan Kratochvil
2015-01-18 4:47 ` Wei-cheng Wang
2015-01-18 7:01 ` Jan Kratochvil
2015-01-18 8:01 ` Wei-cheng Wang
2015-01-19 7:48 ` Joel Brobecker
2015-01-19 16:10 ` [PATCH 2/3 v4] Process record support for PowerPC Wei-cheng Wang
2015-01-19 18:05 ` Ulrich Weigand
2015-01-20 16:03 ` Wei-cheng Wang
2015-01-20 18:14 ` Ulrich Weigand
2015-01-26 17:19 ` Ulrich Weigand
2015-01-26 17:19 ` Wei-cheng Wang
2015-01-26 19:16 ` Doug Evans
2015-01-26 20:29 ` Doug Evans
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=201412171841.sBHIfGSA011030@d03av02.boulder.ibm.com \
--to=uweigand@de.ibm.com \
--cc=cole945@gmail.com \
--cc=gdb-patches@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: 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