This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix ptype.exp fail in MIPS
- From: "Maciej W. Rozycki" <macro at codesourcery dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Hui Zhu <teawater at gmail dot com>, Hui Zhu <hui_zhu at mentor dot com>, gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Tue, 27 May 2014 22:51:29 +0100
- Subject: Re: [PATCH] Fix ptype.exp fail in MIPS
- Authentication-results: sourceware.org; auth=none
- References: <53719B17 dot 5000208 at mentor dot com> <5374FF0D dot 6060608 at redhat dot com> <CANFwon3zoYs8ZJO4HGHc+bAR+eRUQSt2A-CcdwtVq8e9v3Cd+A at mail dot gmail dot com> <5384D643 dot 1070707 at redhat dot com>
On Tue, 27 May 2014, Pedro Alves wrote:
> > https://sourceware.org/ml/gdb/2013-06/msg00032.html
>
> That was an alternative proposal, but nobody replied saying
> it was a great idea, so I don't know. The main disadvantage
> is that the user would have to know about these different
> registers, which may be confusing and obscure.
>
> > Do you think add ptr64 or $_xx is OK for you to handle this issue?
>
> I'm leaning torwards ptr64. Anyone see a reason why that wouldn't work?
>
> That was also sort of agreed upon by both Mark and Maciej at:
>
> https://sourceware.org/ml/gdb/2013-06/msg00029.html
>
> "
> > Overall I think the test is too strict. If you think the use of "long
> > long" is unfortunate for the PC, then an artificial type might be created
> > internally within GDB specifically for the PC, similarly to what we do
> > e.g. for IEEE 754 data types and floating-point registers in some cases.
>
> An artificial type like that probably is the way to go.
> "
>
> But of course that was a while ago and they might have changed
> their minds since.
I don't have a clear preference towards either proposal. Ideally we'd
move away from using any names for magic registers that clash with actual
hardware register names on some or all targets. But it would have been
good ~30 years ago when GDB was starting. Nowadays I think too many users
are used to what we use and a lot of effort invested would break. Maybe
that's actually an argument in favour of your solution.
Maciej