avrdudes / avarice

AVaRICE is a program for interfacing the Atmel JTAG ICE to GDB to allow users to debug their embedded AVR target.
GNU General Public License v2.0
35 stars 11 forks source link

[feature-request #1] Software Breakpoint Support #75

Closed avrs-admin closed 2 years ago

avrs-admin commented 2 years ago

c_oflynn 2006-10-09 14:49:29

Software breakpoint support has been missing from avarice due to the way breakpoints are handled.

I'm attempting to add them, which changes the breakpoint handling a bit.

bp_20061009_noon.tar.gz bp_20061011_8am.tar.gz jtag2bp.cc

This issue was migrated from https://sourceforge.net/p/avarice/feature-requests/1/

avrs-admin commented 2 years ago

c_oflynn 2006-10-09 14:55:04

Logged In: YES user_id=579053

Attached file is first stab at this. Software code breakpoints should work 100%.

Need to fix some stuff, including the single-step breakpoint which I ignore right now.

Data breakpoints are probably broken...

avrs-admin commented 2 years ago

c_oflynn 2006-10-09 14:55:04

new jtag2bp.cc, and patch of jtag2.h

avrs-admin commented 2 years ago

c_oflynn 2006-10-09 14:55:04

avrs-admin commented 2 years ago

c_oflynn 2006-10-11 10:59:27

new jtag2pb.cc, patch of jtag2.h

avrs-admin commented 2 years ago

c_oflynn 2006-10-11 10:59:27

Logged In: YES user_id=579053

Attached new file (bp_20061011_8am.tar.gz) is latest work.

Includes checking if you are using a Mega128 and limiting breakpoints to a safe number. Data watchpoints seem to work to some degree. Range data breakpoints untested.

I think the current code won't shuffle already set code breakpoints around to make room for data breakpoints. This is something still to do (I wrote it here so I don't forget!).

avrs-admin commented 2 years ago

c_oflynn 2006-10-11 11:01:38

Logged In: YES user_id=579053

PS: I still ignore the single-step breakpoint as I don't understand what the current code is doing.

In the old jtag2bp.cc, lines 442 in this if statement:

if (slot == 0) { haveHiddenBreakpoint = true; .......BUNCH MORE LINES }

It's in there that I don't know how to implement as I'm not sure what it's doing...

avrs-admin commented 2 years ago

arcanum 2006-11-21 21:27:54

Logged In: YES user_id=543419 Originator: NO

Moving this to the Feature Request trackers as this is not really a bug.

avrs-admin commented 2 years ago

c_oflynn 2006-11-30 01:24:24

new jtagpb.cc, use with previous patch of jtag2.h. 20061129

avrs-admin commented 2 years ago

c_oflynn 2006-11-30 01:24:24

Logged In: YES user_id=579053 Originator: YES

This is current state of the art. There is still no single-step breakpoint support, I'm having a lot of problems with the JTAG ICE itself.

However I'd appreciate any testing that can be done. From the user's point of view you shouldn't notice any problems, the problem means only 3 of 4 hardware breakpoints are used. You should be able to set as many breakpoints as you want or do anything you'd normally do.

I haven't tested it very throughly yet. This only works with the JTAG ICE MK-II, should work in both debugwire or JTAG mode. All breakpoint types should work in JTAG, code only in debugwire.

avrs-admin commented 2 years ago

c_oflynn 2007-02-21 19:19:19

Logged In: YES user_id=579053 Originator: YES

Note: this is now in CVS, so development will be done there, any other changes should be discussed on the mailing list.

avrs-admin commented 2 years ago

c_oflynn 2007-02-21 19:19:19