On Sat, Jul 18, 2015 at 5:37 AM, Paolo Bonzini <pbonz...@redhat.com> wrote:
>
>
> On 18/07/2015 14:16, Paolo Bonzini wrote:
>>> > +/* target_ulong is the type of a virtual address */
>>> > +#if TARGET_LONG_SIZE == 4
>>> > +#define target_long int32_t
>>> > +#define target_ulong uint32_t
>>> > +#define TARGET_FMT_lx "%08x"
>>> > +#define TARGET_FMT_ld "%d"
>>> > +#define TARGET_FMT_lu "%u"
>>> > +#elif TARGET_LONG_SIZE == 8
>>> > +#define target_long int64_t
>>> > +#define target_ulong uint64_t
>>> > +#define TARGET_FMT_lx "%016" PRIx64
>>> > +#define TARGET_FMT_ld "%" PRId64
>>> > +#define TARGET_FMT_lu "%" PRIu64
>>> > +#else
>>> > +#error TARGET_LONG_SIZE undefined
>>> > +#endif
>> Would it be possible, or make sense, to do
>>
>> #define target_long arm_target_long
>> #define target_ulong arm_target_ulong
>>
>> instead?  This makes prototypes nicer when printed in the debugger with
>> ptype.  Where could this be done?
>
> Hmm, ISTR that this was more or less what v2 was like, so I guess you
> made the change for a reason. :)  So ignore this.
>

I made this change to reduce the cpu.h boiler-plate change pattern and
it makes the undeffery system consistent with other defs. We could go
back to the other way to get this debugability if you think it is
preferrable? Code simplicity vs utility ultimately.

Regards,
Peter

> Paolo
>

Reply via email to