[LLVMdev] argument registers and -g

reed kotler rkotler at mips.com
Tue Jul 10 19:27:17 PDT 2012


On 07/09/2012 04:41 PM, Eric Christopher wrote:
> On Jul 9, 2012, at 3:56 PM, reed kotler<rkotler at mips.com>  wrote:
>
>> On Mips, we have argument registers which are treated as scratch
>> registers with a live in.
>>
>> This will not work with -g -O0 because the arguments to the function
>> will not be displayable after they are clobbered.
>>
>> I'm guess others have solved this problem.
>>
>> Is there a preferred way?
> Not quite sure what you mean. Can you elaborate, perhaps by showing some dwarf or MachineInstrs?
>
> -eric
suppose:

void foo(int i) { // i is passed in a0 register
     int j = i * 370;
     // i is never used again
     //// lots of deep expression code so that the a0 gets used again 
because it's a scratch register.
    // this is okay, because we don't need it, but now in the debugger
    // we can't display i because it has been clobbered.

.....








More information about the llvm-dev mailing list