Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
nichtleiter
PostPosted: Sep 02, 2012 - 08:35 PM
Rookie


Joined: Sep 17, 2011
Posts: 20


Hi all,

i debug my uc-programs with a jtagice mkII in combination with avr-gdb and avarice on a linux system.

With this combination I would like to attach and detach avr-gdb through avarice and the jtagice to a running program on the uc respectively release avr-gdb from a running program.

Unfortunately invoking detach in avr-gdb yields the following error
Code:
(gdb) detach
Detached from remote process.
../../gdb/thread.c:598: internal-error: is_thread_state: Assertion `tp' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)

and avr-gdb exits afterwards.


After that i can't connect an instance of avr-gdb via target remote localhost:6423 anylonger. So i'm not able to check out if attach is working.


I could imagine that the detach/attach mechanism of gdb is not supported by avr-gdb but i'm desperately searching for a way to achieve this kind of workflow with my setup.

I'm stressed out to begin a debugging session by invoking avarice and avr-gdb and then start debugging the program from $pc=0.

I hope to get feedback from anybody who achieved this kind of workflow with a similar setup including a short explanation.

With best regards and thanks for your time
 
 View user's profile Send private message  
Reply with quote Back to top
nichtleiter
PostPosted: Sep 04, 2012 - 04:03 PM
Rookie


Joined: Sep 17, 2011
Posts: 20


Unfortunately nobody of you experts felt addressed so far. Probably i expressed myself to unclearly or i'm to impatient.

Likely most of you are aware of the attach/detach mechanism in gdb.

In the context of debugging an avr over a jtagice my understanding of the interaction between avarice and avr-gdb is as follows. First avarice takes control over the jtagice which controls the on-chip debugger. After that i connect avr-gdb to the target machine via the 'target remote ...' command. Then avr-gdb is automatically attached to the running program on the connected avr and it seems that previously the jtagice invokes a software reset, so $pc=0 and everything in the sram is uninitialized.

Now my question is how can i 'attach' avr-gdb/avarice to the running program by merely stopping it at the current state. At this point i want to begin my debugging session. After debugging the code section of interest i want to detach avr-gdb / avarice from the program, so it continues and is driven by the system clock again. Comparable with a debugging session on a multitasking able OS where i can attach gdb to a running process an detach it at later on.

Eventually I want to repeat this procedure.

Even if you don't now a direct answer to my question any answer describing your debugging workflow with avr-gdb/avarice is greatly appreciated! Since, like i've said before I'm stressed out to begin a debugging session after a reset and starting avarice by hand every time i want to begin a new session or stopping avarice by hand to quit a session.


Thanks for your time and with best regards


Last edited by nichtleiter on Sep 04, 2012 - 04:20 PM; edited 1 time in total
 
 View user's profile Send private message  
Reply with quote Back to top
snigelen
PostPosted: Sep 04, 2012 - 04:17 PM
Posting Freak


Joined: Jan 08, 2009
Posts: 1153
Location: Lund, Sweden

I think what you refer to is called "LiveDebug". If I guess correct then there is no debugging hardware that supports that and is supported by avarice. You probably need an AVRONE and windows debugging software with that.
 
 View user's profile Send private message  
Reply with quote Back to top
nichtleiter
PostPosted: Sep 04, 2012 - 04:49 PM
Rookie


Joined: Sep 17, 2011
Posts: 20


Thanks for the keyword. Yes i am looking for a kind of "LiveDebug" and i found already several interesting posts but so far no one with linux in mind. But linux as system for development is without any alternative. Probably i'm not the only one who linger after live-debugging on a unix-like system.
 
 View user's profile Send private message  
Reply with quote Back to top
snigelen
PostPosted: Sep 04, 2012 - 04:57 PM
Posting Freak


Joined: Jan 08, 2009
Posts: 1153
Location: Lund, Sweden

That would be nice Smile. The problem is probably that the protocol's for the newer debugging devices is not published, so no one outside Atmel know how they work Sad.
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits