This is the mail archive of the gdb@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: Assuming types for PC


> Date: Mon, 10 Jun 2013 16:19:22 +0200
> From: Luis Machado <lgustavo@codesourcery.com>
> 
> Hi,
> 
> I see gdb.base/ptype.exp assuming PC needs to be of type void (*)().
> 
>    # Test ptype of user register
>    gdb_test "ptype \$pc" "void \\(\\*\\)\\(\\)" "ptype \$pc"
> 
> Is there any reason we should assume that? Some targets use "long long" 
> or "int32_t" for PC.

I consider that to be a bug.  Fixing that bug turned out to be
somewhat difficult on some architectures that have a 32-bit/64-bit
identity crisis; see the x32 discussions from last year.

> If PC should not have a fixed type, i think it would be best to remove 
> this check.

Please don't.


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