[padb-users] Make "gdb set language c" for Fortran program to get correct value and offset of symbols.

Ashley Pittman ashley at pittman.co.uk
Thu Nov 25 18:36:04 GMT 2010


I've committed the patch with your change.  I had copied the logic from set_print_address but of course that deals with a boolean flag rather than discrete values.

Ashley.

On 25 Nov 2010, at 01:07, Jie Cai wrote:

> Hi Ashley,
> 
> Agreed, it makes more sense to set the language only when it is needed.
> 
> There is a little bug in line 6323. I have fixed it with the attached patch. Other than that works fine.
> Kind Regards,
> Jie
> 
> -- 
> Jie Cai                         
> Jie.Cai at anu.edu.au
> 
> ANU Supercomputer Facility      NCI National Facility
> Leonard Huxley, Mills Road      Ph:  +61 2 6125 7965
> Australian National University  Fax: +61 2 6125 8199
> Canberra, ACT 0200, Australia   
> http://nf.nci.org.au
> 
> -----------------------------------------------------
> 
> 
> On 25/11/10 09:55, Ashley Pittman wrote:
>> On 23 Nov 2010, at 23:44, Jie Cai wrote:
>> 
>>   
>> 
>>> On 23/11/10 18:55, Ashley Pittman wrote:
>>>     
>>> 
>>>> Thank you for the patch, I'm wondering if it's enough to simply set the mode on attach or does that break the stack traces or local variables in Fortran code?
>>>>       
>>>> 
>>> As I tested, this is not sufficient.
>>>     
>>> 
>>>> Padb already tracks the value of "-gdb-set print address" and changes it as required, perhaps it needs to do the same for "-gdb-set language"?
>>>>   
>>>>       
>>>> 
>>> Yes, you are right. The patch can be simplified as put '-gdb-set languance c' only when '-gdb-set print address' is sent.
>>>     
>>> 
>> I was thinking of something like the attached which sets the value to c when required but reverts it to it's normal state when not.
>> 
>>   
>> 
>> 
>> 
>> 
>>   
>> 
> <bug-fix-gdb.patch>

-- 

Ashley Pittman, Bath, UK.

Padb - A parallel job inspection tool for cluster computing
http://padb.pittman.org.uk





More information about the padb-users mailing list