Page MenuHomePhabricator
Feed Advanced Search

Today

dstenb updated the summary of D85839: [InstCombine] Fix incorrect Modified status.
Wed, Aug 12, 8:13 AM · Restricted Project
dstenb requested review of D85839: [InstCombine] Fix incorrect Modified status.
Wed, Aug 12, 8:13 AM · Restricted Project
dstenb requested review of D85837: [GlobalOpt] Fix incorrect Modified status.
Wed, Aug 12, 7:26 AM · Restricted Project
dstenb requested review of D85818: [UnifyFunctionExitNodes] Fix Modified status for unreachable blocks.
Wed, Aug 12, 1:47 AM · Restricted Project

Yesterday

dstenb committed rGe2f32404727f: [DebugInfo] Allow GNU macro extension to be emitted (authored by dstenb).
[DebugInfo] Allow GNU macro extension to be emitted
Tue, Aug 11, 8:01 AM
dstenb committed rGbb640645f524: [DebugInfo] Simplify DwarfDebug::emitMacro (authored by dstenb).
[DebugInfo] Simplify DwarfDebug::emitMacro
Tue, Aug 11, 8:01 AM
dstenb closed D82975: [DebugInfo] Allow GNU macro extension to be emitted.
Tue, Aug 11, 8:00 AM · Restricted Project, debug-info
dstenb closed D83557: [DebugInfo] Simplify DwarfDebug::emitMacro.
Tue, Aug 11, 8:00 AM · Restricted Project, debug-info
dstenb committed rG91bd9db2cdbc: [DebugInfo] Allow GNU macro extension to be read (authored by dstenb).
[DebugInfo] Allow GNU macro extension to be read
Tue, Aug 11, 4:31 AM
dstenb committed rG2892ed6d0fa9: [DebugInfo] Introduce GNU macro extension entry encodings (authored by dstenb).
[DebugInfo] Introduce GNU macro extension entry encodings
Tue, Aug 11, 4:31 AM
dstenb committed rGa73008c1aed2: [DebugInfo] Refactor .debug_macro checks. NFCI (authored by dstenb).
[DebugInfo] Refactor .debug_macro checks. NFCI
Tue, Aug 11, 4:31 AM
dstenb closed D82974: [DebugInfo] Allow GNU macro extension to be read.
Tue, Aug 11, 4:31 AM · Restricted Project, debug-info
dstenb closed D82972: [DebugInfo] Introduce GNU macro extension entry encodings.
Tue, Aug 11, 4:31 AM · Restricted Project, debug-info
dstenb closed D82971: [DebugInfo] Refactor .debug_macro checks. NFCI.
Tue, Aug 11, 4:31 AM · Restricted Project, debug-info

Mon, Aug 10

dstenb added a comment to D85636: [llvm-dwarfdump] Fix misleading scope byte coverage statistics.

There are no FileCheck checks for the new metric, as far as I can tell?

Mon, Aug 10, 6:57 AM · Restricted Project, debug-info

Sun, Aug 9

dstenb added a comment to D82975: [DebugInfo] Allow GNU macro extension to be emitted.

What do you think about the patch series as it stands now, @SouraVX?

Sun, Aug 9, 9:58 PM · Restricted Project, debug-info

Wed, Jul 15

dstenb added a comment to D82975: [DebugInfo] Allow GNU macro extension to be emitted.

Thanks a lot for the perseverance reviewing this, @dblaikie!

Wed, Jul 15, 1:31 AM · Restricted Project, debug-info

Tue, Jul 14

dstenb updated the diff for D82975: [DebugInfo] Allow GNU macro extension to be emitted.

Fall back to the macinfo format for split DWARF, and add a test case for that.

Tue, Jul 14, 9:13 AM · Restricted Project, debug-info
dstenb added inline comments to D82975: [DebugInfo] Allow GNU macro extension to be emitted.
Tue, Jul 14, 9:12 AM · Restricted Project, debug-info

Jul 13 2020

dstenb added inline comments to D82975: [DebugInfo] Allow GNU macro extension to be emitted.
Jul 13 2020, 9:16 AM · Restricted Project, debug-info
dstenb updated the diff for D82975: [DebugInfo] Allow GNU macro extension to be emitted.

Assert on split DWARF.

Jul 13 2020, 9:12 AM · Restricted Project, debug-info

Jul 10 2020

dstenb added inline comments to D82975: [DebugInfo] Allow GNU macro extension to be emitted.
Jul 10 2020, 8:12 AM · Restricted Project, debug-info
dstenb added inline comments to D82975: [DebugInfo] Allow GNU macro extension to be emitted.
Jul 10 2020, 7:21 AM · Restricted Project, debug-info
dstenb updated the diff for D82975: [DebugInfo] Allow GNU macro extension to be emitted.

Rebase and address review comments.

Jul 10 2020, 7:19 AM · Restricted Project, debug-info
Herald added a project to D83557: [DebugInfo] Simplify DwarfDebug::emitMacro: Restricted Project.
Jul 10 2020, 7:16 AM · Restricted Project, debug-info

Jul 9 2020

dstenb added a comment to D82975: [DebugInfo] Allow GNU macro extension to be emitted.

(Sorry, I don't have a GCC trunk build readily available, so I used GCC 9.3.0 here.)

When using those flags, GCC seems to emit DW_MACRO_define_strp (DW_MACRO_GNU_define_indirect) entries, but with indexed strings as operands. Neither binutils nor GDB does consider that such entries may hold indexed strings, and just treats those operands as indirect strings, which is why they are not properly handled. "Overloading" those indirect operands with indexed strings seems very weird to me. Perhaps that is just a bug in GCC, rather than a limitation in the consumers?

Perhaps - though there was some thought put into supporting GNU debug_macro in v4/pre-standard Fission, given the DWP format had columns for both debug_macro and debug_macinfo ( https://gcc.gnu.org/wiki/DebugFissionDWP ). Don't think it's a big deal either way - if someone comes along wanting to add debug_macro support for pre-standard Fission, we can discuss what that format looks like at that point - happy enough for it to be unimplemented (& as I said before, have "-ggdb -gdwarf-4 -fdebug-macro -> debug_macro" and "-ggdb -gdwarf-4 -fdebug-macro -gsplit-dwarf -> debug_macinfo.dwo").

Jul 9 2020, 11:35 AM · Restricted Project, debug-info
dstenb added a comment to D83468: [Debuginfo] Fix for PR46653.

Could you please add a paragraph to the summary that explains why this change is done?

Jul 9 2020, 3:37 AM · Restricted Project, debug-info

Jul 8 2020

dstenb added a comment to D82975: [DebugInfo] Allow GNU macro extension to be emitted.

I think if it's about compatibility(analogous behavior with GCC), existing infra is Okay/Fine(Since same encodings are used). We just need to emit the .debug_macro section with version 4 and teach the llvm-dwarfdump to parse it correctly.

One difference though is that the GNU extension does not have anything like the strx entries that LLVM currently emits: https://github.com/gcc-mirror/gcc/blob/master/include/dwarf2.h#L425, so I assume we still need code to emit the strp entries when targeting DWARF 4?

Likely - but might want to check what GCC does - maybe it uses some kind of strx encoding that's not documented, etc.

My recollection is that .debug_macro was invented independently of the strx forms so the prototype probably wouldn't have used them. Easy enough to check whether GCC's -fdebug-macro with v4 is emitting a .debug_str_offsets section.

LLVM wouldn't be using strx forms from .debug_info for v4, and would have no other reason to emit .debug_str_offsets, so I wouldn't want LLVM to use them in a v4 compatibility mode .debug_macro section either.

GCC certainly seems to produce some kind of debug_macro.dwo section (& binutils dwp supports it in the index, if I recall correctly) using some form llvm-dwarfdump currently doesn't understand:

$ g++-tot -g3 main.cpp -c -gsplit-dwarf && llvm-objdump -h main.dwo | grep " \.debug"
  1 .debug_info.dwo        0000003c 0000000000000000 
  2 .debug_abbrev.dwo      0000003e 0000000000000000 
  3 .debug_macro.dwo       0000001e 0000000000000000 
  4 .debug_macro.dwo       00000364 0000000000000000 
  5 .debug_macro.dwo       00000013 0000000000000000 
  6 .debug_line.dwo        00000048 0000000000000000 
  7 .debug_str_offsets.dwo 000002d5 0000000000000000 
  8 .debug_str.dwo         00000e05 0000000000000000 
$ llvm-dwarfdump-tot main.dwo -debug-macro
main.dwo:       file format elf64-x86-64

.debug_macro.dwo contents:
0x00000000:
 - lineno: 19 macro: 
DW_MACINFO_invalid

I mean, I don't have strong feelings about supporting macro debug info in general, but if someone feels strongly about debug_macro GNU extension DWARFv4 support, there's certainly some GCC behavior that one could use to model the Split DWARF support for that off.

One more deciding factor to considered here(previously missed) is that: GDB(trunk) also doesn't understand GNU macro extensions(if you wish to call it) in split case.
i.e
gcc -g3 -gsplit-dwarf test.c
test.dwo contains .debug_macro.dwo forms which no tool(as of now can dump).
if you load a.out in GDB and try expanding macro(defined in source).
GDB will report

(gdb) info macro FOO
The symbol `FOO' has no definition as a C/C++ preprocessor macro
at <user-defined>:-1

on the other hand, if you try with -gstrict-dwarf -gsplit-dwarf. GDB is happy.
So at the end of the day, even if we allow GNU macro extension, things will still be broken for -gsplit-dwarf case.
Or we have to teach the debugger to understand this ?, this also hinges on the fact, what kinda form GCC uses in split-case in .debug_macro.dwo section.
That it self is unclear right ?

Jul 8 2020, 6:11 AM · Restricted Project, debug-info
dstenb added a comment to D82975: [DebugInfo] Allow GNU macro extension to be emitted.

When you say 'by default' - do you mean by default when the user requests macro debug info (via -fdebug-macro) or by default without any extra flag?
& what does GCC do? Does it have a way to emit the standard debug_macinfo in v4 and below? Or does it always emit the debug_macro GNU extension?

I'm not particularly sure of this(introduction of GNU encodings). Behavior of GCC trunk(11.0.0) is as follows:

gcc -g3 test.c -c, after dumping using objdump(2.32), GCC will create .debug_macro(sort of it's default, until you specify -gstrict-dwarf in which case GCC will generate .debug_macinfo).

As Sourabh says this is default when not emitting strict DWARF in GCC. For Clang, my intention was for it to be enabled by default for -fdebug-macro when tuning for GDB. Maybe it would also be interesting when tuning for LLDB?

Sounds alright. Not sure if the LLDB folks (@aprantl @JDevlieghere @labath) would be interested in that - a separate patch in any case.

Jul 8 2020, 5:18 AM · Restricted Project, debug-info

Jul 6 2020

dstenb updated the diff for D82975: [DebugInfo] Allow GNU macro extension to be emitted.

Rebase and address comment.

Jul 6 2020, 9:59 AM · Restricted Project, debug-info
dstenb added inline comments to D82974: [DebugInfo] Allow GNU macro extension to be read.
Jul 6 2020, 9:56 AM · Restricted Project, debug-info
dstenb updated the diff for D82974: [DebugInfo] Allow GNU macro extension to be read.

Address comments.

Jul 6 2020, 9:56 AM · Restricted Project, debug-info
dstenb added a comment to D82972: [DebugInfo] Introduce GNU macro extension entry encodings.

Do we really need this ?, Please have a look at https://sourceware.org/legacy-ml/gdb-patches/2017-02/msg00528.html
IMO, it would be unwise to commit it till the discussion thread in D82975 converges ?

Jul 6 2020, 7:55 AM · Restricted Project, debug-info
dstenb updated the summary of D82972: [DebugInfo] Introduce GNU macro extension entry encodings.
Jul 6 2020, 7:54 AM · Restricted Project, debug-info
dstenb updated the summary of D82972: [DebugInfo] Introduce GNU macro extension entry encodings.
Jul 6 2020, 7:53 AM · Restricted Project, debug-info

Jul 2 2020

dstenb added a comment to D82975: [DebugInfo] Allow GNU macro extension to be emitted.

When you say 'by default' - do you mean by default when the user requests macro debug info (via -fdebug-macro) or by default without any extra flag?
& what does GCC do? Does it have a way to emit the standard debug_macinfo in v4 and below? Or does it always emit the debug_macro GNU extension?

I'm not particularly sure of this(introduction of GNU encodings). Behavior of GCC trunk(11.0.0) is as follows:

gcc -g3 test.c -c, after dumping using objdump(2.32), GCC will create .debug_macro(sort of it's default, until you specify -gstrict-dwarf in which case GCC will generate .debug_macinfo).

Jul 2 2020, 8:37 AM · Restricted Project, debug-info
dstenb added inline comments to D82975: [DebugInfo] Allow GNU macro extension to be emitted.
Jul 2 2020, 6:57 AM · Restricted Project, debug-info

Jul 1 2020

dstenb created D82975: [DebugInfo] Allow GNU macro extension to be emitted.
Jul 1 2020, 9:10 AM · Restricted Project, debug-info
dstenb created D82974: [DebugInfo] Allow GNU macro extension to be read.
Jul 1 2020, 9:10 AM · Restricted Project, debug-info
dstenb created D82972: [DebugInfo] Introduce GNU macro extension entry encodings.
Jul 1 2020, 9:09 AM · Restricted Project, debug-info
dstenb created D82971: [DebugInfo] Refactor .debug_macro checks. NFCI.
Jul 1 2020, 9:09 AM · Restricted Project, debug-info
dstenb committed rG85460c4ea273: [DebugInfo] Do not emit entry values for composite locations (authored by dstenb).
[DebugInfo] Do not emit entry values for composite locations
Jul 1 2020, 2:08 AM
dstenb closed D75270: [DebugInfo] Do not emit entry values for composite locations.
Jul 1 2020, 2:07 AM · Restricted Project, debug-info

Jun 30 2020

dstenb added a comment to D75270: [DebugInfo] Do not emit entry values for composite locations.

Thanks, and sorry for letting this patch lay dormant. I'll land this tomorrow when I have time for the build bots.

Jun 30 2020, 1:37 PM · Restricted Project, debug-info

May 29 2020

dstenb accepted D78107: [CSInfo][MIPS] Call delay slot support in DwarfDebug.

LGTM. Sorry for the delay!

May 29 2020, 4:50 AM · Restricted Project, debug-info

May 25 2020

dstenb added a comment to D78107: [CSInfo][MIPS] Call delay slot support in DwarfDebug.

Minor comments. Looks good to me otherwise!

May 25 2020, 12:29 AM · Restricted Project, debug-info

May 14 2020

dstenb added a comment to D78107: [CSInfo][MIPS] Call delay slot support in DwarfDebug.

In beginInstruction() guard we should expect that delay slot instruction is immediately after call instruction, before label insertion.
In constructCallSiteEntryDIEs() guard we should expect that both the call instruction and its successor are followed by the same label.

@dstenb @vsk @djtodoro Thanks for your comments and, please,
let me know what do you think about this approach.

May 14 2020, 9:56 PM · Restricted Project, debug-info
dstenb accepted D78105: [CSInfo][ISEL] Call site info generation support for Mips.

Do you need help with landing this?

May 14 2020, 3:10 AM · Restricted Project, Restricted Project, debug-info

May 13 2020

dstenb added a comment to D78105: [CSInfo][ISEL] Call site info generation support for Mips.

I have a comment about the CHECK/PARSER test cases. Otherwise this looks good to me.

May 13 2020, 3:43 AM · Restricted Project, Restricted Project, debug-info

May 8 2020

dstenb accepted D79624: [NFC][DwarfDebug] Prefer explicit to auto type deduction.

Thanks!

May 8 2020, 6:56 AM · debug-info, Restricted Project
dstenb accepted D79616: [NFC][DwarfDebug] Avoid default capturing when using lambdas.
May 8 2020, 2:38 AM · debug-info, Restricted Project
dstenb added inline comments to D78108: [CSInfo][MIPS] Describe parameter value loaded by ADDiu instruction.
May 8 2020, 2:06 AM · Restricted Project, debug-info
dstenb added inline comments to D79616: [NFC][DwarfDebug] Avoid default capturing when using lambdas.
May 8 2020, 1:01 AM · debug-info, Restricted Project

Apr 30 2020

dstenb added inline comments to D78107: [CSInfo][MIPS] Call delay slot support in DwarfDebug.
Apr 30 2020, 7:21 AM · Restricted Project, debug-info
dstenb accepted D78106: [CSInfo][NFC] Interpret loaded parameter value separately.

One minor comment about singular/plural phrasing. Otherwise this looks good to me!

Apr 30 2020, 4:11 AM · Restricted Project, debug-info
dstenb added a comment to D75270: [DebugInfo] Do not emit entry values for composite locations.

Hi @dstenb,

What is the status with this?

Apr 30 2020, 3:57 AM · Restricted Project, debug-info

Apr 27 2020

Herald added a project to D78107: [CSInfo][MIPS] Call delay slot support in DwarfDebug: Restricted Project.
Apr 27 2020, 7:29 AM · Restricted Project, debug-info
Herald added a project to D78106: [CSInfo][NFC] Interpret loaded parameter value separately: Restricted Project.
Apr 27 2020, 5:19 AM · Restricted Project, debug-info

Apr 14 2020

dstenb added inline comments to D78106: [CSInfo][NFC] Interpret loaded parameter value separately.
Apr 14 2020, 10:43 AM · Restricted Project, debug-info
dstenb added inline comments to D78107: [CSInfo][MIPS] Call delay slot support in DwarfDebug.
Apr 14 2020, 10:10 AM · Restricted Project, debug-info
dstenb added inline comments to D78106: [CSInfo][NFC] Interpret loaded parameter value separately.
Apr 14 2020, 10:10 AM · Restricted Project, debug-info
dstenb added inline comments to D78108: [CSInfo][MIPS] Describe parameter value loaded by ADDiu instruction.
Apr 14 2020, 10:10 AM · Restricted Project, debug-info

Apr 7 2020

dstenb added inline comments to D77639: [DebugInfo][NFC] Early-exit when analysing for single-location variables.
Apr 7 2020, 1:03 PM · Restricted Project
dstenb accepted D77639: [DebugInfo][NFC] Early-exit when analysing for single-location variables.

Two minor nits, but otherwise this looks good to me. Thanks!

Apr 7 2020, 9:45 AM · Restricted Project
dstenb added a comment to D77639: [DebugInfo][NFC] Early-exit when analysing for single-location variables.

Adding a nit. I'll try to take a closer look at the functionality later today.

Apr 7 2020, 6:28 AM · Restricted Project

Mar 27 2020

dstenb added inline comments to D76878: Implement DW_{OP,AT}_LLVM_* for Heterogeneous Debugging.
Mar 27 2020, 7:03 AM · debug-info, Restricted Project

Mar 19 2020

dstenb added a comment to D75326: [entry values] X86: Describe effects of MOV{8,16}ri (PR45053).

Yeah, sure! I can put together a mail for the mailing list today or tomorrow.

Mar 19 2020, 10:17 AM · debug-info, Restricted Project
dstenb updated the diff for D76145: [DebugInfo] Introduce a DW_OP_LLVM_convert_generic operation.

Rebase on top of D76423. Add a test that verifies that the operation is emitted correctly in location lists. Without D76423 this patch would simply emit a DW_OP_convert with the first base type in ExprRefedBaseTypes, rather than 0x0.

Mar 19 2020, 3:44 AM · Restricted Project, debug-info
dstenb added a comment to D76423: [DebugInfo] Make base type placeholder values larger than 0.

This was something I overlooked when implementing D76145.

Mar 19 2020, 3:44 AM · Restricted Project, debug-info
dstenb created D76423: [DebugInfo] Make base type placeholder values larger than 0.
Mar 19 2020, 3:44 AM · Restricted Project, debug-info

Mar 18 2020

dstenb committed rGa0a3a9c5a831: [DebugInfo] Fix multi-byte entry values in call site values (authored by dstenb).
[DebugInfo] Fix multi-byte entry values in call site values
Mar 18 2020, 5:25 AM
dstenb closed D76279: [DebugInfo] Fix multi-byte entry values in call site values.
Mar 18 2020, 5:24 AM · Restricted Project, debug-info
dstenb added a comment to D76279: [DebugInfo] Fix multi-byte entry values in call site values.

Thanks for the reviews! I'll land this shortly.

Mar 18 2020, 3:46 AM · Restricted Project, debug-info

Mar 17 2020

dstenb added a comment to D76279: [DebugInfo] Fix multi-byte entry values in call site values.

LGTM! Thanks!

So, this was causing the wrong call_site_value for the parameter only?

Mar 17 2020, 8:30 AM · Restricted Project, debug-info
dstenb added a comment to D75326: [entry values] X86: Describe effects of MOV{8,16}ri (PR45053).
In D75326#1925517, @vsk wrote:

No worries, I think this is great feedback. I think we've just touched on a tricky part of the standard. Do you still have the time to start a discussion about this on the dwarf mailing list?

Mar 17 2020, 7:25 AM · debug-info, Restricted Project
dstenb added inline comments to D76164: Fix an assertion error when emitting call site info that combines two DW_OP_stack_values..
Mar 17 2020, 7:24 AM · Restricted Project, debug-info
dstenb created D76279: [DebugInfo] Fix multi-byte entry values in call site values.
Mar 17 2020, 6:52 AM · Restricted Project, debug-info
dstenb added a comment to D76145: [DebugInfo] Introduce a DW_OP_LLVM_convert_generic operation.

Have you thought about doing this

Mar 17 2020, 5:43 AM · Restricted Project, debug-info

Mar 16 2020

dstenb added a comment to D76146: [DebugInfo] Use DW_OP_LLVM_convert_generic after sign/zero exts.

Mechanically LGTM to me. I'm not sure if this shouldn't be done in DwarfExpression instead.

Mar 16 2020, 12:01 PM · Restricted Project, debug-info
dstenb committed rG02b6a3c3499f: [DebugInfo] Handle generic type DW_OP_convert ops in dsymutil (authored by dstenb).
[DebugInfo] Handle generic type DW_OP_convert ops in dsymutil
Mar 16 2020, 4:38 AM
dstenb closed D76142: [DebugInfo] Handle generic type DW_OP_convert ops in dsymutil.
Mar 16 2020, 4:38 AM · Restricted Project, debug-info
dstenb committed rGc93652517c81: [DebugInfo] Handle generic type DW_OP_convert ops in llvm-dwarfdump (authored by dstenb).
[DebugInfo] Handle generic type DW_OP_convert ops in llvm-dwarfdump
Mar 16 2020, 3:55 AM
dstenb closed D76141: [DebugInfo] Handle generic type DW_OP_convert ops in llvm-dwarfdump.
Mar 16 2020, 3:54 AM · Restricted Project, debug-info
dstenb updated the diff for D76142: [DebugInfo] Handle generic type DW_OP_convert ops in dsymutil.

Remove binary file from diff due to issues with arc patch. I'll add the file back when landing this, which I plan to do shortly.

Mar 16 2020, 3:53 AM · Restricted Project, debug-info

Mar 13 2020

dstenb added a comment to D76164: Fix an assertion error when emitting call site info that combines two DW_OP_stack_values..

Sorry for taking some extra time with that PR. This patch should fix that assertion, but we would emit invalid debug information, related to D76146, for that case.

Mar 13 2020, 3:41 PM · Restricted Project, debug-info
dstenb added a comment to D76164: Fix an assertion error when emitting call site info that combines two DW_OP_stack_values..

Can you also test on the reduced test cases in https://bugs.llvm.org/show_bug.cgi?id=45181 ?

Mar 13 2020, 3:40 PM · Restricted Project, debug-info
dstenb created D76146: [DebugInfo] Use DW_OP_LLVM_convert_generic after sign/zero exts.
Mar 13 2020, 11:17 AM · Restricted Project, debug-info
dstenb created D76145: [DebugInfo] Introduce a DW_OP_LLVM_convert_generic operation.
Mar 13 2020, 10:44 AM · Restricted Project, debug-info
dstenb created D76142: [DebugInfo] Handle generic type DW_OP_convert ops in dsymutil.
Mar 13 2020, 10:11 AM · Restricted Project, debug-info
dstenb created D76141: [DebugInfo] Handle generic type DW_OP_convert ops in llvm-dwarfdump.
Mar 13 2020, 10:11 AM · Restricted Project, debug-info

Mar 12 2020

dstenb added a comment to D73534: [DebugInfo] Enable the debug entry values feature by default.

Hi,

I see another crash with this change when building gdb.

Reduced test case:
struct type *a(type *, type *, long, long);
enum b {};
static int empty_array(type *, int c) { type *d = a(__null, d, c, c - 1); }
long e;
b f() { empty_array(0, e); }

Repros with:
clang -cc1 -triple x86_64-linux-gnu -emit-obj -disable-free -mrelocation-model pic -pic-level 2 -pic-is-pie -mthread-model posix -mframe-pointer=all -mconstructor-aliases -munwind-tables -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -O2 -x c++

Chromium bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1060788

Oh, that assertion is related to D75036 which I did. I can have a look at that.

Mar 12 2020, 3:03 AM · Restricted Project, Restricted Project, Restricted Project, debug-info
dstenb added a comment to D73534: [DebugInfo] Enable the debug entry values feature by default.

Hi,

I see another crash with this change when building gdb.

Reduced test case:
struct type *a(type *, type *, long, long);
enum b {};
static int empty_array(type *, int c) { type *d = a(__null, d, c, c - 1); }
long e;
b f() { empty_array(0, e); }

Repros with:
clang -cc1 -triple x86_64-linux-gnu -emit-obj -disable-free -mrelocation-model pic -pic-level 2 -pic-is-pie -mthread-model posix -mframe-pointer=all -mconstructor-aliases -munwind-tables -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -O2 -x c++

Chromium bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1060788

Mar 12 2020, 3:03 AM · Restricted Project, Restricted Project, Restricted Project, debug-info

Mar 11 2020

dstenb accepted D75974: [DebugInfo] Fix build failure on the mingw.

LGTM

Mar 11 2020, 3:47 AM · Restricted Project, debug-info
dstenb added a comment to D75974: [DebugInfo] Fix build failure on the mingw.

Thanks, this seems like a good workaround to get rid of the assertion until D75326 has landed.

Mar 11 2020, 2:19 AM · Restricted Project, debug-info

Mar 9 2020

dstenb added a comment to D75326: [entry values] X86: Describe effects of MOV{8,16}ri (PR45053).
In D75326#1904157, @vsk wrote:

Sorry for the delay here.

@dstenb wrote:

When I print that in GDB 8.2.1, 0x5566 is printed instead of 0x11225566 which is the actual parameter value:

Yeah, this sounds like a debugger bug to me. The debugger should print something that indicates that the upper bits of "param" are unknown. Although, to be fair, lldb has the same bug (or it might be worse, and print out "param" as 0x00005566 -- it doesn't track the bits of a variable that are uncovered by pieces).

The DW_OP_entry_value operation at the callee expects a value to be pushed to the DWARF stack when evaluating the DW_AT_call_value at the caller. How should/would that work with composite descriptions?

Well, in lldb at least, I think the idea is that while OP_piece doesn't push anything to the stack, it changes the debugger's notion of which bits in the evaluated result are "valid". So one way this could work is: the result of evaluating the DW_AT_call_value is pushed onto the stack when evaluating DW_OP_entry_value (and if it's e.g. a 2-byte piece, so be it).

All of which sounds a little iffy to me for what appears to be a pretty uncommon case (fwiw I was able to build all of clang & LNT for x86 without hitting this).

Mar 9 2020, 9:08 AM · debug-info, Restricted Project

Mar 4 2020

dstenb added a comment to D75270: [DebugInfo] Do not emit entry values for composite locations.
In D75270#1897102, @vsk wrote:

Fixing the assertion failure in this way sgtm. Re:

Mar 4 2020, 5:06 AM · Restricted Project, debug-info

Mar 3 2020

dstenb added a comment to D75326: [entry values] X86: Describe effects of MOV{8,16}ri (PR45053).

I dug around some in the Dwarf-discuss archive, and it seems that when working on DWARFv3 the piece operations were moved out from the "Dwarf Expressions" section to "Location Descriptions" to clarify that they don't push anything to the stack.

Mar 3 2020, 3:04 AM · debug-info, Restricted Project

Mar 2 2020

dstenb added a comment to D75326: [entry values] X86: Describe effects of MOV{8,16}ri (PR45053).
In D75326#1898465, @vsk wrote:

If OP_piece in an entry value really /is/ an issue, please confirm, and I'll update the x86 describeLoadedValue to just return 'None' for mov{8,16}ri (it doesn't seem worth it to me to do anything more complicated).

Mar 2 2020, 3:53 AM · debug-info, Restricted Project
dstenb added a comment to D75326: [entry values] X86: Describe effects of MOV{8,16}ri (PR45053).
In D75326#1898465, @vsk wrote:
In D75326#1898071, @vsk wrote:

Thank you @dstenb and @djtodoro very much for your feedback.

I think I've addressed the main issue, we now produce DW_AT_call_value (DW_OP_constu 0x840, DW_OP_stack_value, DW_OP_piece 0x2). PTAL.

I might be incorrect here, but I don't think we are allowed to use DW_OP_piece operations in DW_AT_call_value attributes, as they should be DWARF expressions? As far as I have understood it, the DW_OP_piece operation is only allowed in composite location descriptions, and you can in general not go from location descriptions to DWARF expressions, with the only (?) exception being DW_OP_entry_value operations holding register location descriptions.

(This seems a bit related to D75270, in which I stop emitting entry values around composite location descriptions, since the DWARF standard specifies that those are only allowed to hold DWARF expressions and register location descriptions.)

If I understand your reading correctly, it's that composite location descriptions are not (in general) a kind of DWARF expression.

FWIW, this doesn't line up with my understanding. DWARF5 says "a single location description" may be "a composite location description", which consists of "one or more simple location descriptions", each of which describes "one piece of the object" (2.6.1). And it says that a DWARF expression describes "how to compute a value or specify a location" (2.5). That certainly /sounds/ like a composite location can be a DWARF expression.

Mar 2 2020, 2:07 AM · debug-info, Restricted Project

Feb 28 2020

dstenb added a comment to D75326: [entry values] X86: Describe effects of MOV{8,16}ri (PR45053).
In D75326#1898071, @vsk wrote:

Thank you @dstenb and @djtodoro very much for your feedback.

I think I've addressed the main issue, we now produce DW_AT_call_value (DW_OP_constu 0x840, DW_OP_stack_value, DW_OP_piece 0x2). PTAL.

Feb 28 2020, 8:14 AM · debug-info, Restricted Project