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 4/8] remove some stale FIXMEs


On 11/26/2013 09:49 PM, Tom Tromey wrote:
> This removes a couple of old "32x64" FIXME comments that are no longer
> true -- the code they annotate is correct now.

Not really true.  unsigned long is usually 32-bit on 32-bit hosts.
So on 32x64 (32-bit host, 64-bit target), the unsigned long casts
trim the target address to 32-bit.
The casts should be removed, or even better, the hex_string
calls replaced by:

  paddress (get_current_arch (), sal.pc))

>  
>            if (sal.symtab == 0)
> -	    /* FIXME-32x64--assumes sal.pc fits in long.  */
>  	    error (_("No source file for address %s."),
>  		   hex_string ((unsigned long) sal.pc));
>  
> @@ -982,7 +981,6 @@ list_command (char *arg, int from_tty)
>        struct gdbarch *gdbarch;
>  
>        if (sal.symtab == 0)
> -	/* FIXME-32x64--assumes sal.pc fits in long.  */
>  	error (_("No source file for address %s."),
>  	       hex_string ((unsigned long) sal.pc));
>  
-- 
Pedro Alves


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