[PATCH] Fix PR testsuite/1504

Andrew Cagney cagney@gnu.org
Sun Jan 18 18:51:00 GMT 2004


> Turns out there is an inconsistency between platforms in the error
> message one gets when reading from a bit of memory that isn't
> readable:
> 
> void
> memory_error (int status, CORE_ADDR memaddr)
> {
>   struct ui_file *tmp_stream = mem_fileopen ();
>   make_cleanup_ui_file_delete (tmp_stream);
> 
>   if (status == EIO)
>     {
>       /* Actually, address between memaddr and memaddr + len
>          was out of bounds. */
>       fprintf_unfiltered (tmp_stream, "Cannot access memory at address ");
>       print_address_numeric (memaddr, 1, tmp_stream);
>     }
>   else
>     {
>       fprintf_filtered (tmp_stream, "Error accessing memory address ");
>       print_address_numeric (memaddr, 1, tmp_stream);
>       fprintf_filtered (tmp_stream, ": %s.",
>                        safe_strerror (status));
>     }
> 
>   error_stream (tmp_stream);
> }
> 
> I wonder whether we should try to unify this.  In the meantime, this
> patch fixes the fall-out in the testsuite.

Yes, definitly.  Kfail instead - that would flush out those cases?

Andrew




More information about the Gdb-patches mailing list