GDB macros

Luca Germano lucagermano at
Wed Sep 13 07:47:41 UTC 2006

Hi, thanks for your help.
I'm using the GDB macros version of the rtems wiki. I'm using RTEMS on Leon3 
I find the problems.
When a macro refers to an RTEMS global variables is necessary to cast the 
variables to the primitive type of the variable to be able to access its 
fields. Doing the cast the macros work fine. For examples in the 
rtems_classic_tasks macros I can't use directly _RTEMS_tasks_Information but 
I must do
       set $prova = (Objects_Information)_RTEMS_tasks_Information
       rtems_helper_show_task  $prova $arg0
instead of
      rtems_helper_show_task  _RTEMS_tasks_Information $arg0
In some macro there are some pointer conversion cast for example
      (Thread_Control_struct *)
Also this instraction doesn't work. I must use
      (Thread_Control *)
Now I must correct all the macros.
The ultimate thing to set is the macro rtems_task_backtrack that is HW 
dependent. Someone know the field of the structure Register of the RTEMS 
context switch to use for Leon3?

Best Regards
Luca Germano

>From: Paul Whitfield <paulw at>
>To: Luca Germano <lucagermano at>
>CC: leonp at,  rtems-users at
>Subject: Re: GDB macros
>Date: Wed, 13 Sep 2006 08:54:54 +0800
>Luca Germano wrote:
>>I put a breakpoint in the program. After program execution stop on the 
>>breakpoint I execute the macro.
>>>From: leonp at
>>>To: rtems-users at
>>>Subject: Re: GDB macros
>>>Date: Tue, 12 Sep 2006 11:41:08 +0300
>>>On Tuesday, 12 בSeptember 2006 11:37, Luca Germano wrote:
>>> > Thanks for the help.
>>> > I try to use the rtems_classic_tasks macro but gdb give me the 
>>> > reply
>>> >
>>> > =====================================================================
>>> > Attempt to extract a component of a value that is not a structure.
>>> > # | Name |    ID    | Pri |  Ticks   | State
>>> > ---+------+----------+-----+----------+------------------------------
>>> >
>>> > How can I solve this problem?
>>>Is the program running? I mean have you stopped it in the middle of the
>>>execution and them executed the macro?
>Hi Luca,
>Which version of the Macros are you using?
>Make sure you are using the latest ones from the rtems wiki.
>Also I have found in the past you need to use the command line
>version of gdb to debug the macros, if you use a GUI/IDE interface
>such as insight or emacs it hides error messages from you which
>makes it difficult to debug the problem(s).
>The information in this e-mail is intended for the addressee only.
>Unauthorised use, copying, disclosure or distribution by anyone else
>is prohibited. Please let us know immediately if you receive this
>e-mail in error. Thank you.

More information about the users mailing list