Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 356875 - gdb hw dbg - Current program location not updated after Load Image
Summary: gdb hw dbg - Current program location not updated after Load Image
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-06 20:26 EDT by Evan Hunter CLA
Modified: 2020-09-04 15:17 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Evan Hunter CLA 2011-09-06 20:26:58 EDT
Build Identifier: 20110615-0604

I am using GDB Hardware Debugging (7.0.0.201106081058) with OpenOCD, and am finding that if the "Load image" checkbox is selected in the Startup page, then the following happens:

* Eclipse commands GDB to retrieve the current register values.
* Image is loaded into memory (including setting PC to entry point)
* Eclipse does not retrieve the updated register values, and displays the current program location as whatever was originally in the PC register. 

Hence, if registers are zeroed at reset, then the current program location will show as zero despite the entry point having been defined. Instruction stepping the processor causes the system to update and the program location becomes valid. 

It seems like a stack backtrace update is needed after the image load.




Reproducible: Always

Steps to Reproduce:
1. Create ELF file with non-zero entry point.
2. Start OpenOCD, connected to hardware device with enough RAM for ELF image. CPU should be reset and halted.
3. Select "Load Image" option
4. Start debugging program in eclipse
5. When the program is ready, it will show incorrect program location in stack.