[PATCH] D103131: support debug info for alias variable

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 11 11:58:49 PDT 2021


dblaikie added a comment.

In D103131#2811969 <https://reviews.llvm.org/D103131#2811969>, @kamleshbhalui wrote:

> In D103131#2811220 <https://reviews.llvm.org/D103131#2811220>, @dblaikie wrote:
>
>> Any idea if the GDB test suite covers this functionality? I'd hope so, but maybe it doesn't.
>>
>> But yeah, at the moment I don't have any great reason to avoid the imported declaration form - so happy to go with that.
>
> Hi David,
>
> with imported declaration patch and with current patch(in review or say gcc way) this case works ok(we can print type and value of newname)
> $cat test.c
> int oldname = 1;
> extern int newname attribute((alias("oldname")));
>
> but when we make newname static it works with current patch(in review or say gcc way) but it does not work with imported decl patch(https://reviews.llvm.org/D103131?id=347883).
>
> Should we go with gcc way or am I missing something?
> note: used gdb debugger.

An ideas what's happening when `newname` is static? Is the DWARF any different/interesting there? (since the DWARF for imported decl seems like it would have nothing to do with the linkange of the alias - since it doesn't refer to the actual alias in the object file, etc)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103131/new/

https://reviews.llvm.org/D103131



More information about the cfe-commits mailing list