This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix ptype.exp fail in MIPS


On 05/16/2014 08:40 AM, Hui Zhu wrote:
> On Fri, May 16, 2014 at 1:53 AM, Pedro Alves <palves@redhat.com> wrote:
>> On 05/13/2014 05:09 AM, Hui Zhu wrote:
>>> ptype $pc
>>> type = int32_t
>>> (gdb) FAIL: gdb.base/ptype.exp: ptype $pc
>>> This is because the $pc register in MIPS is set to int but not code_ptr.
>>> And according to the discussion in
>>> https://sourceware.org/ml/gdb/2013-06/msg00020.html, the type cannot be
>>> changed.
>>
>> Hmm, that's not what I get from this branch of the discussion:
>>
>>  https://sourceware.org/ml/gdb/2013-06/msg00021.html
>>
>> --
> 
> 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.

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]