This is the mail archive of the ecos-discuss@sourceware.org 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: Can "redboot + gdb stub" debug an application that has its own vector?


Thanks a lot.

Can you please kindly hints us a little more on this part?

The vector part (from address 0x20 to 0x3C) are always changed when we load
a new application (ELF file) using the "load" gdb command. And after that we
failed to enter gdb-stub. So is the solution to keep some redboot's
vector pointers
(e.g. undefined_instruction, software_interrupt, abort_data...) ?

Thanks. :)


On Tue, Oct 28, 2008 at 11:20 PM, Gary Thomas <gary@mlbassoc.com> wrote:
> Fu-Yuan Lee wrote:
>> Hi all,
>>
>> I am new to eCos and have one question about redboot and gdb-stub.
>> Please kindly help us
>> if you have any experience on this subject.  Any hint is highly appreciated.
>>
>> As far as we know, the gdb stub heavily depends on the exception
>> handling, which is
>> coded in vectors.S. This exception code will normally be placed at
>> address 0x0 (low vector)
>> or 0xFFFF0000 (high vector) (take ARM as an example). Then it is confusing that
>> how can the "redboot + gdb stub" debug an application that needs to
>> deal with interrupts.
>>
>> What I mean is: if the application needs to handle interrupts, it has
>> to prepare its own
>> vector and the hal_interrupt_handlers. And this vector will overwrite
>> redboot's vector.
>> As a result, there will be no way to enter gdb stub after loading the
>> application (because
>> the vector has changed).
>>
>> Is there any misunderstanding here? Debugging an application via
>> redboot+gdb is really
>> an excellent feature. But vector part does also confuse us a lot. Can
>> anyone give us
>> some advice?
>
> Debugging uses exceptions, not interrupts.  Care is taken to allow
> GDB (via RedBoot) to still handle the exceptions which are used for
> debugging, while still allowing the application to handle interrupts
> (as well as non-debug related exceptions when this makes sense)
>
>
>
> --
> ------------------------------------------------------------
> Gary Thomas                 |  Consulting for the
> MLB Associates              |    Embedded world
> ------------------------------------------------------------
>
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>
>



-- 
Lee, Fu-Yuan
Distributed System and Network Security Lab.
Dept. of Comp. Sci. & Info. Eng
Nat'l Chiao Tung Univ.
Hsinchu, Taiwan 30050, ROC
E-Mail: leefy@csie.nctu.edu.tw

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


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