When trying to load a ELF binary into the LatticeMico32 (LM32) simulator with non-zero load and start addresses, parts of GDB will still use the default zero address and cause many commands (backtrace, info, ...) to fail or display wrong results. This can be seen when using those commands (Linux kernel loaded at 0x40000000): lm32-elf-gdb vmlinux target sim --memory-region 0x40000000,0x4000000 load run Also, "info mem" does not report anything even though I think a memory region should be defined at 0x40000000 - but I'm not familiar enough with gdb to decide if it's a bug or not.
I forgot to mention I'm using gdb-6.8.50.20090630
it's not clear to me what your expectations are. the memory-region command does *not* change where code is loaded ... instead, it just connects a chunk of memory to the addr that you requested. so when you use "memory-region 0x40000000,0x4000000", that connects a chunk of memory at address 0x40000000 with a length of 0x4000000 bytes. the "load" command is used to control where to load the requested file -- since you didn't specify any arguments, it uses an offset of 0 (the default). an example run: $ ./gdb/gdb -q ./sim/testsuite/pass.s.x (gdb) target sim --memory-region 0x40000000,0x4000000 Connected to the simulator. (gdb) load Loading section .text, size 0x24 lma 0x0 Loading section .data, size 0x102a lma 0x1024 Start address 0x0 Transfer rate: 33392 bits in <1 sec. (gdb) sim memory-info Memory maps: memory region 0x40000000,0x4000000 memory region 0x00000000,0x10000 i'm going to close this bug assuming that you're mixing up the behavior of the memory-region command. please re-open with more details for us to look at (and attach some example ELFs for us to test with).