[llvm-commits] [llvm] r79274 - /llvm/trunk/lib/Analysis/DebugInfo.cpp

Devang Patel devang.patel at gmail.com
Thu Aug 20 12:59:48 PDT 2009


Reply to all.

On Thu, Aug 20, 2009 at 12:58 PM, Devang Patel<devang.patel at gmail.com> wrote:
> On Thu, Aug 20, 2009 at 11:11 AM, Sanjiv
> Gupta<sanjiv.gupta at microchip.com> wrote:
>> Devang Patel wrote:
>>> Author: dpatel
>>> Date: Mon Aug 17 15:36:20 2009
>>> New Revision: 79274
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=79274&view=rev
>>> Log:
>>> Oops. find all llvm.dbg.global_variables.
>>>
>>> Modified:
>>>     llvm/trunk/lib/Analysis/DebugInfo.cpp
>>>
>>> Modified: llvm/trunk/lib/Analysis/DebugInfo.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DebugInfo.cpp?rev=79274&r1=79273&r2=79274&view=diff
>>>
>>> ==============================================================================
>>> --- llvm/trunk/lib/Analysis/DebugInfo.cpp (original)
>>> +++ llvm/trunk/lib/Analysis/DebugInfo.cpp Mon Aug 17 15:36:20 2009
>>> @@ -942,7 +942,7 @@
>>>         GVI != GVE; ++GVI) {
>>>      GlobalVariable *GV = GVI;
>>>      if (!GV->hasName() || !GV->isConstant()
>>> -        || strcmp(GV->getName().data(), "llvm.dbg.global_variable")
>>> +        || strncmp(GV->getName().data(), "llvm.dbg.global_variable", 24)
>>>          || !GV->hasInitializer())
>>>        continue;
>>>      DIGlobalVariable DIG(GV);
>>>
>>>
>>>
>> This breaks PIC16's debug info again.
>
>
> ?
> This patch fixes obvious "oops" where DebugInfoFinder was discarding
> all but first llvm.dbg.global_variable. Fixing this reported so many
> new success on the gdb testsuite run that someone nearly fall off the
> chair here :)
>
>>
>> Try a simple case below with clang-cc -g -triple=pic16 , llc -march=pic16,
>
>
> What's the error ? This command generated .s file.
> -
> Devang
>>
>> char *ptr = (char *)0xA0;
>> struct _st_1{
>> int s1_1;
>>
>> struct _nested {
>> int nest_var;
>> }nested;
>> }st_1={10,10};
>>
>> int a;
>>
>> int main()
>> {
>> a = st_1.nested.nest_var;
>> *ptr = a;
>> }
>>
>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>
>
>
> --
> -
> Devang
>



-- 
-
Devang




More information about the llvm-commits mailing list