As Christian Taedcke wrote: > Why does gdb try to read that address?
Depending on the GDB build, it might or might not access the XML description. My GDB version tells me: (gdb) targ rem :1212 Remote debugging using :1212 warning: Can not parse XML target description; XML support was disabled at compile time In that case, GDB simply doesn't have a notion of the target's flash size, because it doesn't have any information about the device type being debugged. > Can you give me a hint where to > look? I don't think it's appropriate to completely bail out in that situation. IMHO, simulavr should return an error to GDB. This is the respective code in AVaRICE: case 'm': // mAA..AA,LLLL Read LLLL bytes at address AA..AA { uchar *jtagBuffer; if((hexToInt(&ptr, &addr)) && (*(ptr++) == ',') && (hexToInt(&ptr, &length))) { debugOut("\nGDB: Read %d bytes from 0x%X\n", length, addr); try { jtagBuffer = theJtagICE->jtagRead(addr, length); mem2hex(jtagBuffer, remcomOutBuffer, length); delete [] jtagBuffer; } catch (jtag_exception&) { error(1); } } break; } And error() is defined as: /** Set remcomOutBuffer to error 'n' response */ static void error(int n) { char *ptr = remcomOutBuffer; *ptr++ = 'E'; ptr = byteToHex(n, ptr); *ptr = '\0'; } Thus, an attempt to read beyond the target's memory presumably would yield the response E01. -- cheers, Joerg .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ Never trust an operating system you don't have sources for. ;-) _______________________________________________ Simulavr-devel mailing list Simulavr-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/simulavr-devel