GDB macros file
Joel Sherrill
joel.sherrill at oarcorp.com
Mon Sep 11 15:18:26 UTC 2006
leonp at plris.com wrote:
> Hello, all.
>
> In July Joel published the new version of the GDB macros file.
> I tried to use it and found it really very useful and significantly improved.
> Many thanks, Joel!
>
> Now, some issues I encountered...
>
> 1. First question is - I feel a bit uncomfortable with the command names so
> long and therefore hard to remember and to type. May be it can be something
> simpler? For example, instead of rtems_classic_message_queue - rtems_mq,
> while for rtems_posix_semaphores - rtems_ps, etc...
>
>
You can always add function definitions at the bottom which provide
shorthand
names and pass all arguments to the longer name.
> 2. For my gdb 6.1.1 I have several problems with some macros:
> - rtems_classic_semaphores prints out one LIBIO semaphore and the gdb crashes;
>
Can you post the structure dump for the semaphore causing this? It
should be something
like:
p/x *(Semaphore_Control *)(_Semaphore_Information.local_table[2])
> - rtems_classic_task 2
> =====================================================================
> # | Name | ID | Pri | Ticks | State
> ---+------+----------+-----+----------+------------------------------
> 2 | LOGR | 0a010002 | 250 | 1 | Wmsg
>
> BACKTRACE
> 13:37, 11 Jul 2006 (CDT)[[User:JoelSherrill|Dr. Joel]] 13:37, 11 Jul 2006
> (CDT)
> Invalid cast.
> ^^^^^^^^^^_________________________________
> Is it normal?
>
>
No. :)
Hmmm.. is the backtrace function implemented on the CPU you are using? Look
at the source and see if it is using the right register for the
stack/base pointer?
The only way I know to debug this is to add debug messages to the macros and
see which value is bogus.
>
> Again, a lot of thanks to Joel!
>
More information about the users
mailing list