This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Arm rdi target and initial processor mode
- From: Grant Edwards <grante at visi dot com>
- To: Pierre Habraken <Pierre dot Habraken at imag dot fr>
- Cc: gdb at sources dot redhat dot com
- Date: Tue, 28 May 2002 11:42:38 -0500
- Subject: Re: Arm rdi target and initial processor mode
- References: <3CF12F20.62CC6F45@imag.fr>
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