OpenCores
Issue List
Proxy has problems with RedHat/TI GDB Debugger #33
Closed frhs opened this issue about 8 years ago
frhs commented about 8 years ago

The Get-Register procedure in the proxy was not updated to the new 32-bit matter. I made the following changes in the commands.tcl and the debugging problems are gone:

#-----------------------------------------------------------------------------#

Read CPU registers

#-----------------------------------------------------------------------------# proc rsp_g {CpuNr} {

global mspgcc_compat_mode

# Read register value
set reg_val [ReadRegAll $CpuNr]

# Format answer
set rsp_answer ""
for {set i 0} {$i < [llength $reg_val]} {incr i} {

    regexp {0x(..)(..)} [lindex $reg_val $i] match msb lsb
	if {$mspgcc_compat_mode} {
    	append rsp_answer "$lsb$msb"
	} else {
		append rsp_answer "$lsb${msb}0000"
	}
}

return $rsp_answer

}

#-----------------------------------------------------------------------------#

Write CPU registers

#-----------------------------------------------------------------------------# proc rsp_G {CpuNr cmd} {

global mspgcc_compat_mode

# Format register value
if {$mspgcc_compat_mode} {
	set num_reg [expr [string length $cmd]/4]
} else {
	set num_reg [expr [string length $cmd]/8]
}
set reg_val ""
for {set i 0} {$i < $num_reg} {incr i} {
	
	if {$mspgcc_compat_mode} {
		set lsb "[string index $cmd [expr $i*4+0]][string index $cmd [expr $i*4+1]]"
		set msb "[string index $cmd [expr $i*4+2]][string index $cmd [expr $i*4+3]]"
	} else {
		set lsb "[string index $cmd [expr $i*8+0]][string index $cmd [expr $i*8+1]]"
		set msb "[string index $cmd [expr $i*8+2]][string index $cmd [expr $i*8+3]]"
	}
    lappend reg_val "0x$msb$lsb"
}

# Write registers
WriteRegAll $CpuNr $reg_val

return "OK"

}

olivier.girard was assigned about 8 years ago
olivier.girard commented about 8 years ago

Hi Simon,

thanks a lot for reporting AND fixing the issue :-) I'll update soon update the repository with the fix.

Oliv'

olivier.girard closed this almost 8 years ago
olivier.girard commented almost 8 years ago

Issue fixed with SVN r217


Assignee
olivier.girard
Labels
Bug