mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 09:16:02 +02:00
Overhaul load. Turns out all we need is a simple implementation. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=310304#c34
This commit is contained in:
parent
e0ee9359b1
commit
443bcd6c99
1 changed files with 1 additions and 14 deletions
|
@ -76,20 +76,7 @@ public class DefaultGDBJtagDeviceImpl implements IGDBJtagDevice {
|
|||
* @see org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.IGDBJtagDevice#doLoadImage(java.lang.String, java.lang.String, java.util.Collection)
|
||||
*/
|
||||
public void doLoadImage(String imageFileName, String imageOffset, Collection<String> commands) {
|
||||
String file = escapeScpaces(imageFileName);
|
||||
if (imageOffset.length() > 0) {
|
||||
// 'restore' simply puts the program into memory.
|
||||
addCmd(commands, "restore " + file + " " + imageOffset);
|
||||
}
|
||||
else {
|
||||
// 'load' puts the program into memory and sets the PC. To see why
|
||||
// we do this when no offset is specified, see
|
||||
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=310304#c20
|
||||
addCmd(commands, "load " + file);
|
||||
}
|
||||
// 'exec-file' specifies the program as the context for getting memory.
|
||||
// Basically, it tells gdb "this is the program we'll be debugging"
|
||||
addCmd(commands, "exec-file " + file);
|
||||
addCmd(commands, "load " + escapeScpaces(imageFileName) + ' ' + imageOffset);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
Loading…
Add table
Reference in a new issue