Python GDB support queries

Gedare Bloom gedare at rtems.org
Sun Apr 21 15:34:57 UTC 2013


A prototype is good for the proposal. And then you can propose a
better design that you will implement in the summer if accepted.
-Gedare

On Sun, Apr 21, 2013 at 1:00 AM, Dhananjay Balan <mb.dhananjay at gmail.com> wrote:
> Hi,
>
> Thanks for the inputs.
>
> I have solved the problem - the problem was the thread structure definition
> was wrong. PFA diff for my edits, also my semaphore listing command works
> fine now (With an information flood in gdb window ;))
>
> A sample output is here : https://gist.github.com/5428535
>
> About duplicating a lot of resources - I was trying to quickly prototype
> stuff I didn't care about hierarchies much, The problem was that the code
> design needs to be tweaked heavily to use as a general framework to build
> rtems gdb extensions.
>
>
>
>
> On 17 April 2013 00:05, Joel Sherrill <joel.sherrill at oarcorp.com> wrote:
>>
>> On 4/16/2013 1:26 PM, Dhananjay Balan wrote:
>>>
>>> Hi,
>>>
>>> Was fiddling little bit with code, trying to convert some of the GDB
>>> sim-scripts into the python functions.
>>>
>>> PFA diff of the function I wrote - it tries to print a list of all
>>> semaphores. But I could not get past this error (I can print the ids, but
>>> error occurs during the printing of semaphore information, something related
>>> to task queues I suppose.)
>>>
>>> Please find the debug information here -> https://gist.github.com/5398227
>>>
>>> Also gdb gave me this https://gist.github.com/anonymous/5398125
>>>
>>> Any thoughts why this function fails?
>>>
>>>
>>> Also just being curious
>>> https://gist.github.com/dhananjaynav/5398261#file-threads-py-L191 shouldn't
>>> this be indexed at Priority rather than at Fifo?
>>>
>>>
>> I can't tell much but I am guessing that this happened because the chain
>> is empty and the code around lines 29-31 isn't right.
>>
>> Assuming pointers are 4 bytes and the chain control is at 0x10000, the
>> chain control when empty looks like this:
>>
>> 0x10000    0x10004
>> 0x10004    0
>> 0x10008    0x10000
>>
>> The "empty" check is written this way in C.
>>
>> bool _Chain_Is_empty( const Chain_Control *the_chain)
>> {
>>   return _Chain_Immutable_first( the_chain )     == _Chain_Immutable_tail(
>> the_chain );
>> }
>>
>> Line 16 needs to change to check that node != chain.immutable_tail().
>>
>> FYI I am thrilled you are this far!!! If you can mirror the inheritance in
>> the code in the Python for gdb, a lot of this is repetitive. The macros
>> should give a hint at how to inherit.
>>
>>> --
>>> Regards,
>>> Dhananjay M Balan,
>>>
>>
>>
>> --
>> Joel Sherrill, Ph.D.             Director of Research & Development
>> joel.sherrill at OARcorp.com        On-Line Applications Research
>> Ask me about RTEMS: a free RTOS  Huntsville AL 35805
>> Support Available                (256) 722-9985
>>
>
>
>
> --
> Regards,
> Dhananjay M Balan,
> Department Of Computer Science,
> College Of Engineering, Trivandrum.
> http://cet.ac.in
>
> _______________________________________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-devel
>



More information about the devel mailing list