RTEMS gdb script

Chris Johns cjohns at cybertec.com.au
Thu Dec 12 02:58:45 UTC 2002


Joel Sherrill wrote:

> That's a good idea.  Do you have an example?

I use the follow commands to help remove the C type syntax from general use:

#
# Commands to ease the C notation of GDB.
# These command read and write 8, 16 and 32 values.
#

define set8
  set *((unsigned char*) $arg0) = $arg1
end

document set8
Set 8bit memory: set8 ADDRESS VALUE
end

define set16
  set *((unsigned short*) $arg0) = $arg1
end

document set16
Set 16bit memory: set16 ADDRESS VALUE
end

define set32
  set *((unsigned long*) $arg0) = $arg1
end

document set32
Set 32bit memory: set32 ADDRESS VALUE
end

define d8
  x /$arg1b $arg0
end

document d8
Dump 8bit memory: d8 ADDRESS LENGTH
end

define d16
  x /$arg1h $arg0
end

document d16
Dump 16bit memory: d16 ADDRESS LENGTH
end

define d32
  x /$arg1w $arg0
end

document d32
Dump 32bit memory: d32 ADDRESS LENGTH
end

define uhelp
  help user-defined
end

document uhelp
List user commands.
end

> I think it needs to be .. Any suggestions on a real name and a location
> in the source tree.

   rtems-score-gdb

or

   rtems-cpukit-gdb

-- 
  Chris Johns, cjohns at cybertec.com.au




More information about the users mailing list