BUG: gdb_server.c Line 1492; (gdb_memory_map enable related)

Hi,

For AT91SAM7S target the line in the startup script can be:

flash bank at91sam7 0 0 0 0 0

It is stated in the docs that all all other values are looked up after reading the chip-id and type.

The following line is used in the OCD startup script to give an XML memory map to GDB:

gdb_memory_map enable

When “target extended-remote localhost:3333” is used to in GDB to connect to OCD. An exception is thrown in the application. The location is:

SVN Revision 272

File: gdb_server.c

Function: gdb_query_packet

Line 1492: p->base, p->size, p->size/p->num_sectors);

I found that the flash bank info is populated with zeros (e.g. p->num_sectors = 0) which results in a zero divide by zero.

A workaround is to connect to OCD with telnet first and issue the command “flash probe 0” to look up all the info first before GDB connects.

Best regards,

Pieter

P.S. Is there a better mailing list to submit bugs for OCD and check if this bug has been reported before?

Hello Pieter,

P.S. Is there a better mailing list to submit bugs for OCD and check if this bug has been reported before?

You can take a look here:

https://lists.berlios.de/mailman/listin … evelopment

Best regards,

Michael

Just for info, this is fixed in the latest svn.

Cheers

Spen