This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Arm rdi target and initial processor mode


On Sun, May 26, 2002 at 08:53:20PM +0200, Pierre Habraken wrote:
> Yet another newbie question :
> 
> I want to debug an Arm program which must start running in supervisor
> mode. The target is an Arm Evaluator7T (target rdi /dev/ttyS0).
> In order to achieve that, one way is to appropriately set up the initial
> value of the status register by typing something like:
> 
> (gdb) break _start
> (gdb) continue
> (gdb) set variable $cpsr = 0x83
> (gdb) continue 
> 
> But this is the hard way.
> I would like to use a single gdb command or option which would tell
> Angel to set the processor mode to the desired value before launching
> the program.
> Does any such command or option exist ?

break _start
  commands
  set variable $cpsr = 0x83
  cont
  end

cont
  
Note the use of the "commands" option to tell gdb a list of
commands to execute when the breakpoint is hit.  GDB also has a
macro facility that lets you define new commands.  All of this
is in the fine manual:

http://sources.redhat.com/gdb/download/onlinedocs/

-- 
Grant Edwards
grante@visi.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]