[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] avarice again
From: |
Klaus Rudolph |
Subject: |
[avr-gcc-list] avarice again |
Date: |
Thu, 1 Aug 2002 08:52:46 +0200 (MEST) |
Hallo all,
I took a short look inside the avarice sources and found
no function to set the PC. So I must not
wonder that I am not able to set PC from gdb. Or have
I overseen something?
I think that there must be a 'cAAAA' command which
set PC to new execution position and
therefor must be a way to get the AAAA to the device via
jtag. But inside the remote.cc i found:
240 case 'c': // cAA..AA Continue from address AA..AA(optional)
241 // try to read optional parameter, pc unchanged if no parm
242 #if 0 // not yet supported
243 if(hexToInt(&ptr, &addr))
244 {
245 registers[PC] = addr;
246 }
247 #endif
248 if (jtagContinue())
249 {
250 strcpy(remcomOutBuffer, "S05"); // Just tell it a break
happened.
251 }
252 else
253 {
254 // A breakpoint did not occur. Assume that GDB sent a break.
255
256 // NEED SOMETHING MORE CLEVER THAN THIS!!
257
258 // Flush the GDB command buffer.
259 (void)tcflush(gdbFileDescriptor, TCIFLUSH);
260 // Halt the target.
261 finishCommand();
262 // Send signal up to gdb. Sadly, I can't find in the GDB
manual,
263 // which signal to send up. When you run GDB locally under
264 // Linux, a CTRL-C results in GDB saying "Program received
265 // signal SIGINT, Interrupt." This should mean that the
266 // following should work. So far, I can only get GDB to
either
267 // declare that "The program no longer exists" or simply not
268 // return the GDB prompt to me :-(.
269 // strcpy(remcomOutBuffer, "W02"); // Just tell it interrupt
occured.
270 strcpy(remcomOutBuffer, "S05"); // Just tell it a break
happened.
271 // strcpy(remcomOutBuffer, "W07"); // Just tell it a break
happened.
272 // strcpy(remcomOutBuffer, "S03"); // Just tell it interrupt
occured.
273 // strcpy(remcomOutBuffer, "S17"); // Just tell it processed
stoped.
274 // strcpy(remcomOutBuffer, "W00"); // Just tell it processed
stoped.
275 }
276 break;
This seems not to be working way to set PC, or?
Same I found with single step instructions: 'sAAAA'
Also only set a breakpoint here :-(
How do you set the execution position with gdb and avarice?
Which gdb commands can I use to debug?
Thanks
Klaus
--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
avr-gcc-list at http://avr1.org
- [avr-gcc-list] avarice again,
Klaus Rudolph <=