From: Andreas Arnez <arnez@linux.vnet.ibm.com>
To: "Ulrich Weigand" <uweigand@de.ibm.com>
Cc: lgustavo@codesourcery.com, gdb-patches@sourceware.org
Subject: Re: [ping 2] [RFA][PATCH v4 0/5] Add TDB regset support
Date: Tue, 16 Jul 2013 17:06:00 -0000 [thread overview]
Message-ID: <87sizel9iq.fsf@br87z6lw.de.ibm.com> (raw)
In-Reply-To: <201307161602.r6GG2up6007938@d06av02.portsmouth.uk.ibm.com> (Ulrich Weigand's message of "Tue, 16 Jul 2013 18:02:56 +0200 (CEST)")
"Ulrich Weigand" <uweigand@de.ibm.com> writes:
> Your patch below doesn't show the common code changes, so I'm not
> sure how you planned to handle legacy platforms. I guess it might
> be possible to detect them using zero markers in those fields ...
Right, before coming up with a complete patch I wanted to get some
feedback on this general idea. So I guess it's worth giving it a try?
> As an aside, I'm wondering:
>
>> + res = cb (tdep->wordsize == 4 ?
>> + &ppc32_linux_gregset : &ppc64_linux_gregset,
>> + cb_data);
>> + if (!res)
>> + res = cb (&ppc32_linux_fpregset, cb_data);
>> + if (!res && have_altivec)
>> + res = cb (&ppc32_linux_vrregset, cb_data);
>> + if (!res && have_vsx)
>> + cb (&ppc32_linux_vsxregset, cb_data);
>
> Why does the callback need to return a flag that has to be handled
> by the caller? If there is indeed a requirement for treating
> error conditions specially, couldn't the callback store error data
> in the cb_data and handle it on subsequent calls?
This is a good point. Yes, this is for error handling, and yes, the
error indication could be moved to cb_data.
> This would make the gdbarch implementations in the targets yet
> easier and simpler to write, something along the lines of:
>
> if (tdep->wordsize == 4)
> cb (&ppc32_linux_gregset, cb_data);
> else
> cb (&ppc64_linux_gregset, cb_data);
> cb (&ppc32_linux_fpregset, cb_data);
> if (have_altivec)
> cb (&ppc32_linux_vrregset, cb_data);
> if (have_vsx)
> cb (&ppc32_linux_vsxregset, cb_data);
Yup.
next prev parent reply other threads:[~2013-07-16 17:06 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-03 16:57 Andreas Arnez
2013-07-03 17:00 ` [RFA][PATCH v4 1/5] S/390 regmap rework Andreas Arnez
2013-07-15 14:46 ` Luis Machado
2013-07-15 17:15 ` Andreas Arnez
2013-07-03 17:02 ` [RFA][PATCH v4 2/5] S/390: Add TDB regset Andreas Arnez
2013-07-03 19:25 ` Eli Zaretskii
2013-07-03 17:04 ` [RFA][PATCH v4 3/5] Dynamic core regset sections support Andreas Arnez
2013-07-03 17:11 ` [RFA][PATCH v4 4/5] S/390: Exploit dynamic core regset sections Andreas Arnez
2013-07-03 17:21 ` [RFA][PATCH v4 5/5] PowerPC: " Andreas Arnez
2013-07-08 15:44 ` [ping] [RFA][PATCH v4 0/5] Add TDB regset support Andreas Arnez
2013-07-15 8:49 ` [ping 2] " Andreas Arnez
2013-07-15 13:27 ` Luis Machado
2013-07-15 15:34 ` Andreas Arnez
2013-07-15 15:40 ` Luis Machado
2013-07-15 16:30 ` Andreas Arnez
2013-07-16 15:26 ` Andreas Arnez
2013-07-16 16:03 ` Ulrich Weigand
2013-07-16 17:06 ` Andreas Arnez [this message]
2013-07-15 15:58 ` Mark Kettenis
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=87sizel9iq.fsf@br87z6lw.de.ibm.com \
--to=arnez@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=lgustavo@codesourcery.com \
--cc=uweigand@de.ibm.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