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 v3 05/14] sim/erc32: Use memory_iread() function for instruction fetching.


[re-adding cc]

On 12 Mar 2015 22:39, Jiri Gaisler wrote:
> On 02/03/15 02:15, Mike Frysinger wrote:
> > On 01 Mar 2015 22:10, Jiri Gaisler wrote:
> >> --- a/sim/erc32/erc32.c
> >> +++ b/sim/erc32/erc32.c
> 
> >> +    printf("Memory exception at %x (illegal address)\n", addr);
> > 
> > space after the printf
> > 
> > should this be writing to stderr ?
> 
> Not really. The exception occurred in the emulated program, which is not
> uncommon and useful during target debugging. The simulator has not
> encountered any error.

if the sim isn't stopping, i don't think it's correct to display anything at 
all.  it is valid to simulate code that purposefully makes bad/weird memory 
accesses and then recover at runtime using signal handlers.  uncommon perhaps, 
but not invalid.

for diagnostic info meant for the developer, putting it behind a debug/trace 
knob would make more sense.
-mike

Attachment: signature.asc
Description: Digital signature


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