This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos 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: Question eCOS debugging. Thanks a lot.


"QiangHuang" <jameshq@liverpool.ac.uk> writes:

> Question 1.
> I can't understand in Step 11 that why the parameter (func=="R0"?) passed
> from Step 10 will be a flag rather than ARM register R0 or where is R0 in
> GDB_Register set to flag, while it is R0 of the ARM register? (Am I wrong
> for this?)

The function code is put into R0 by the application before it makes
the system call. All the system calls are defined to have the function
code in R0.

> 
> Question 2.
> In step 11, arg1=R1 (ARM register), arg2=R2 (ARM register), arg3=R3 (ARM
> register), which will be served as file descriptor, buffer and count in Step
> 12 expected by cyg_hal_gdbfileio_write/read( ) function. How/Where are those
> register set to those (file descriptor, buffer and count? Isn't arg0=R0,
> arg1=R1, arg2=R2, arg3=R3 are the saved ARM registers just before
> exception?)
>

Like the function code these are set by the application before the
syscall. The system calls are defined to pass arguments in those
registers.


-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com      The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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