Page MenuHomePhabricator

zturner (Zachary Turner)
User

Projects

User does not belong to any projects.

User Details

User Since
May 26 2014, 12:49 PM (256 w, 2 d)

Recent Activity

Fri, Apr 19

zturner added a comment to rG41fe3a54c261: Ensure that ManagedStatic is constant initialized in MSVC 2017 & 2019.

I just built against trunk with VS 2019 and ran into this exact issue. llvm-tblgen had no command line options. Are more fixes still in the pipeline or was this thought to be sufficient?

Fri, Apr 19, 9:07 PM

Fri, Apr 12

zturner committed rGe1bc9758cb43: [PDB Docs] Add some prose describing public and global symbols. (authored by zturner).
[PDB Docs] Add some prose describing public and global symbols.
Fri, Apr 12, 8:52 AM
zturner committed rL358289: [PDB Docs] Add some prose describing public and global symbols..
[PDB Docs] Add some prose describing public and global symbols.
Fri, Apr 12, 8:52 AM

Thu, Apr 11

zturner committed rG528b01e99847: Fix sphinx documentation warning. (authored by zturner).
Fix sphinx documentation warning.
Thu, Apr 11, 10:29 AM
zturner committed rG4afa6dcabe68: [PDB Docs] Add skeleton of documentation for CodeView symbols. (authored by zturner).
[PDB Docs] Add skeleton of documentation for CodeView symbols.
Thu, Apr 11, 10:29 AM
zturner committed rL358198: Fix sphinx documentation warning..
Fix sphinx documentation warning.
Thu, Apr 11, 10:28 AM
zturner committed rL358197: [PDB Docs] Add skeleton of documentation for CodeView symbols..
[PDB Docs] Add skeleton of documentation for CodeView symbols.
Thu, Apr 11, 10:28 AM
zturner added inline comments to D60547: Add checks for MSVC in LLVM_FALLTHROUGH and LLVM_NODISCARD.
Thu, Apr 11, 9:21 AM · Restricted Project
zturner added reviewers for D60547: Add checks for MSVC in LLVM_FALLTHROUGH and LLVM_NODISCARD: zturner, rnk.
Thu, Apr 11, 9:21 AM · Restricted Project

Wed, Apr 10

zturner committed rG5a736c9bbf0b: [PDB Docs] Start documenting CodeView Type Records. (authored by zturner).
[PDB Docs] Start documenting CodeView Type Records.
Wed, Apr 10, 11:26 AM
zturner committed rL358119: [PDB Docs] Start documenting CodeView Type Records..
[PDB Docs] Start documenting CodeView Type Records.
Wed, Apr 10, 11:25 AM

Tue, Apr 9

zturner committed rG6bafd5b3f70c: [PDB Docs] Clarifications and fixes for DBI Stream. (authored by zturner).
[PDB Docs] Clarifications and fixes for DBI Stream.
Tue, Apr 9, 10:38 AM
zturner committed rL358022: [PDB Docs] Clarifications and fixes for DBI Stream..
[PDB Docs] Clarifications and fixes for DBI Stream.
Tue, Apr 9, 10:37 AM

Mon, Apr 8

zturner accepted D60354: llvm-undname: Fix more crashes and asserts on invalid inputs.
Mon, Apr 8, 12:44 PM · Restricted Project
zturner added inline comments to D60354: llvm-undname: Fix more crashes and asserts on invalid inputs.
Mon, Apr 8, 11:55 AM · Restricted Project

Fri, Apr 5

zturner committed rGcb70fe1c69a2: [PDB Docs] Add documentation for the hash table format. (authored by zturner).
[PDB Docs] Add documentation for the hash table format.
Fri, Apr 5, 3:08 PM
zturner committed rG91d6caf6ec1f: [PDB Docs] The IPI Stream actually has index 4. (authored by zturner).
[PDB Docs] The IPI Stream actually has index 4.
Fri, Apr 5, 3:08 PM
zturner committed rL357826: [PDB Docs] Add documentation for the hash table format..
[PDB Docs] Add documentation for the hash table format.
Fri, Apr 5, 3:07 PM
zturner committed rL357825: [PDB Docs] The IPI Stream actually has index 4..
[PDB Docs] The IPI Stream actually has index 4.
Fri, Apr 5, 3:07 PM
zturner committed rGbcf7f3c573ca: [PDB Docs] Delete * LINKER * Stream information. (authored by zturner).
[PDB Docs] Delete * LINKER * Stream information.
Fri, Apr 5, 2:15 PM
zturner committed rL357819: [PDB Docs] Delete * LINKER * Stream information..
[PDB Docs] Delete * LINKER * Stream information.
Fri, Apr 5, 2:14 PM
zturner committed rG6eb7ab97a58d: Try to fix Sphinx bot. (authored by zturner).
Try to fix Sphinx bot.
Fri, Apr 5, 11:09 AM
zturner committed rL357790: Try to fix Sphinx bot..
Try to fix Sphinx bot.
Fri, Apr 5, 11:05 AM
zturner committed rG5eeb28f8e0cc: [PDB Docs] Finish documentation for PDB Info Stream. (authored by zturner).
[PDB Docs] Finish documentation for PDB Info Stream.
Fri, Apr 5, 10:59 AM
zturner committed rL357788: [PDB Docs] Finish documentation for PDB Info Stream..
[PDB Docs] Finish documentation for PDB Info Stream.
Fri, Apr 5, 10:59 AM
zturner committed rGd248f027955c: [PDB Docs] Add info about the hash adjustment buffer. (authored by zturner).
[PDB Docs] Add info about the hash adjustment buffer.
Fri, Apr 5, 10:12 AM
zturner committed rL357784: [PDB Docs] Add info about the hash adjustment buffer..
[PDB Docs] Add info about the hash adjustment buffer.
Fri, Apr 5, 10:12 AM
zturner committed rG85cc79551d71: Add documentation for PDB TPI/IPI Stream. (authored by zturner).
Add documentation for PDB TPI/IPI Stream.
Fri, Apr 5, 9:43 AM
zturner committed rL357777: Add documentation for PDB TPI/IPI Stream..
Add documentation for PDB TPI/IPI Stream.
Fri, Apr 5, 9:43 AM
zturner accepted D57533: lit: support long paths on Windows.
Fri, Apr 5, 9:04 AM · Restricted Project

Wed, Apr 3

zturner updated the diff for D57911: [LLDB] Remove all abandoned LLDB bots.

Also remove LLDBTriggerable.py

Wed, Apr 3, 3:47 PM · Restricted Project
zturner updated the diff for D57911: [LLDB] Remove all abandoned LLDB bots.

Add the scheduler back but remove the android builder only.

Wed, Apr 3, 3:42 PM · Restricted Project
zturner accepted D60210: llvm-undname: Name a pair. No behavior change..
Wed, Apr 3, 2:42 PM · Restricted Project
zturner accepted D60202: llvm-undname: Fix a crash-on-invalid.
Wed, Apr 3, 2:42 PM · Restricted Project
zturner accepted D60206: llvm-undname: Fix an assert-on-invalid.
Wed, Apr 3, 2:42 PM · Restricted Project
zturner accepted D60204: llvm-undname: Fix an assert-on-invalid.
Wed, Apr 3, 2:42 PM · Restricted Project
zturner updated the diff for D57911: [LLDB] Remove all abandoned LLDB bots.

Rebased

Wed, Apr 3, 1:25 PM · Restricted Project
zturner added inline comments to D60152: Fix and simplify PrepareCommandsForSourcing.
Wed, Apr 3, 12:50 PM · Restricted Project
zturner accepted D60207: llvm-undname: Fix a crash-on-invalid.
Wed, Apr 3, 9:24 AM · Restricted Project

Tue, Apr 2

zturner committed rL357513: [NativePDB] Don't fail on import modules..
[NativePDB] Don't fail on import modules.
Tue, Apr 2, 12:41 PM
zturner committed rGa31347f17d1f: [NativePDB] Don't fail on import modules. (authored by zturner).
[NativePDB] Don't fail on import modules.
Tue, Apr 2, 12:40 PM
zturner committed rLLDB357513: [NativePDB] Don't fail on import modules..
[NativePDB] Don't fail on import modules.
Tue, Apr 2, 12:40 PM

Mon, Apr 1

zturner added reviewers for D59862: Add a function for mapping PDBSymbol index IDs to lldb::LangTypes: amccarth, aleksandr.urakov, stella.stamenova.
Mon, Apr 1, 8:13 PM
zturner added a comment to D59862: Add a function for mapping PDBSymbol index IDs to lldb::LangTypes.

Can't you just write a function that, every time you call it, traces the symbol back to its original compile unit (you can get this from the PdbCompilandSymId), get the CompileUnit item, and ask it for its language? The part that seems unnecessary is the cache.

For a general PDBSymbol? There's a getCompilandId for PDBSymbolFunction and PDBSymbolData which get the compliand from the DIALines they hold. There's a GetPDBCompilandByUID that accepts an arbitrary ID and dyn_cast_or_null's it to a Compiland. I don't see anything else given that a general PDBSymbol doesn't have any access to it's parents.

Mon, Apr 1, 8:08 PM
zturner added a comment to D59862: Add a function for mapping PDBSymbol index IDs to lldb::LangTypes.

Can't you just write a function that, every time you call it, traces the symbol back to its original compile unit (you can get this from the PdbCompilandSymId), get the CompileUnit item, and ask it for its language? The part that seems unnecessary is the cache.

Mon, Apr 1, 4:02 PM
zturner added a comment to D59866: Fork PDBASTParser to a base class and create PDBASTParserClang.

Is the nature of the PDB different enough that it warrants an entirely new implementation? There's a efw places where we parse decorated / undecorated names, but in general I would imagine most of the stuff is language agnostic no?

Mon, Apr 1, 1:36 PM
zturner accepted D59819: Make operator==s consistent between c++ and python APIs.
Mon, Apr 1, 1:35 PM · Restricted Project
zturner accepted D59849: [lldb-vscode] Add logic to handle EOF when reading from lldb-vscode stdout..
Mon, Apr 1, 1:33 PM · Restricted Project, Restricted Project
zturner accepted D60068: PDBFPO: Refactor register reference resolution.
Mon, Apr 1, 1:33 PM · Restricted Project
zturner added a comment to D59862: Add a function for mapping PDBSymbol index IDs to lldb::LangTypes.

Do you have a single PDB with multiple source file languages in it? This seems like it is going to consume a ton of memory if there's one of these for each SymUID

Mon, Apr 1, 1:33 PM

Fri, Mar 29

zturner added a comment to D60018: [codeview] Remove Type member from CVRecord.

Nice, does this actually have any performance impact? Since the arrays are smaller and have better cache locality.

Fri, Mar 29, 7:13 PM · Restricted Project, Restricted Project, Restricted Project

Thu, Mar 28

zturner added a comment to D59911: Don't abort() in lldb_assert and document why..

My (maybe unpopolar) opinion on the subject is that "soft assertions" are a way to cleanse your conscience of guilt, but they don't work really well in practice.
When I started working on lldb, I was a fairly strong proponent of assertions everywhere. My view changed somewhat radically over the course of the past 18 months, and I would like to summarize some points here.

  1. Vendors (some) ship a release or two of debuggers every 6 months. Even if you just look at open source, llvm gets released every 6 months and distributions downstream package just the release version. Not everybody runs gentoo or exherbo or compiles his toolchain from svn. For these people the debugger has just to work. Assertions are always compiled out in release mode so this is not an issue. I strongly agree that for internal interfaces they have to be used as liberally as possible, mostly because they catch bugs in development. llvm libraries tend to use assertions galore, and developers put them in "just in case", and I think this is really not something we should do in lldb.
  2. Errors have to be handled, properly. I don't think returning a default constructed object in case something goes bad is better than throwing an error. We now have rich/proper error handling in llvm to make sure the process blows up if the error is not checked. This is a good thing.
  3. The above points are IMHO the only two needed ways of handling invariants/invalid input. Anything else in the middle is just going to cause confusion to new and existing developer. Adrian (or anybody else), do you have any real example where something wasn't either a user error or a strong invariant that couldn't be violated? I personally didn't, hence I don't understand the need for "soft" assertions here.

Here is a concrete example of the sort of thing I thought lldbassert was for. In DWARFExpression::AddressRangeForLocationListEntry if we come across a LocationList format we don't understand, we do:

default:
  // Not supported entry type
  lldbassert(false && "Not supported location list type");
  return false;
Thu, Mar 28, 4:29 PM · Restricted Project, Restricted Project
zturner accepted D59953: Add .py extension to clang-tools-extra lit cfg files.
Thu, Mar 28, 3:26 PM · Restricted Project

Tue, Mar 26

zturner added a comment to D59854: [Host] Add LibraryLoader abstraction around dlopen/LoadLibrary.

It isn't safe to pass "data()" of a StringRef to dlsym.

Why?

StringRef's aren't guaranteed to be NULL terminated. Or rather, the Data that gets returned by the data() method is just the raw pointer in the StringRef, which isn't guaranteed to be NULL terminated.

Tue, Mar 26, 5:25 PM · Restricted Project
zturner accepted D59828: Add lldb-vscode as a dependency of lldb tests..
Tue, Mar 26, 11:16 AM · Restricted Project, Restricted Project

Mar 21 2019

zturner added a comment to D59620: [llvm-pdbutil] Add -type-ref-stats to help find unused type info.
In D59620#1438210, @rnk wrote:

I don't think you can have a cycle to an unnamed type though because it's impossible to reference it.

In C, yes, so far as I can tell it's impossible to reference an unnamed struct or union from inside it.

Or maybe you can, by doing something like:

struct {
  auto foo() { return this; }
  
  decltype(foo()) node;
};

I'd be curious to see how well the debugger handles that.

The decltype bit isn't necessary, just having a method is enough to make a cycle between the method type and the class. So, since pretty much all types in C++ have methods, MSVC gives all C++ types "unique" names. Of course, if they are at global scope, they may not in fact be unique across the whole program, but that just means there might type confusion later on during a debugging session.

For this example, MSVC creates a fwd decl with the unique name .?AU<unnamed-type-node>@@:

struct {
  auto foo() { return this; }
  int x;
} node;
int bar() { return node.foo()->x; }
Mar 21 2019, 10:41 AM · Restricted Project
zturner added a comment to D59620: [llvm-pdbutil] Add -type-ref-stats to help find unused type info.
In D59620#1438186, @rnk wrote:

Another question - do you think we could replace forward references by the the concrete ones?

I don't think we could replace forward references with the full declarations. Forward references exist to deal with cycles, as well as to make sure the entire type stream can be topologically sorted.

While the linker certainly doesn't want to read PDBs with cycles in the type graph, it's possible that debuggers could handle it just fine. In fact, it might even speed things up. There are cases (unnamed types in C) where the compiler can't use forward references because there is no unique mangled name for the type, and the debuggers handle that.

I think it would be reasonable to add an option to LLD to write PDBs that replace all forward references with the appropriate complete type. Then we can experiment with debuggers and see if it works, what the size and perf effect is, etc.

Mar 21 2019, 10:20 AM · Restricted Project
zturner created D59651: Move DebugRanges() function from SymbolFileDWARF to DWARFContext.
Mar 21 2019, 9:40 AM
zturner committed rGb4fe87d0c9b1: Move the rest of the sections over to DWARFContext. (authored by zturner).
Move the rest of the sections over to DWARFContext.
Mar 21 2019, 9:37 AM
zturner committed rL356682: Move the rest of the sections over to DWARFContext..
Move the rest of the sections over to DWARFContext.
Mar 21 2019, 9:34 AM
zturner committed rLLDB356682: Move the rest of the sections over to DWARFContext..
Move the rest of the sections over to DWARFContext.
Mar 21 2019, 9:34 AM
zturner closed D59611: Move the rest of the section loading over to DWARFContext.
Mar 21 2019, 9:33 AM · Restricted Project
zturner added a comment to D59611: Move the rest of the section loading over to DWARFContext.

Use reference to DWARFContext instead of pointers? Apply to entire patch and good to go

Mar 21 2019, 9:33 AM · Restricted Project
zturner added a comment to D59620: [llvm-pdbutil] Add -type-ref-stats to help find unused type info.

Another question - do you think we could replace forward references by the the concrete ones?
ie.replace references to 0x100E with 0x1016, and remove 0x100E:

CHECK:   0x100E | LF_STRUCTURE [size = 108, unreferenced] `__vc_attributes::event_sourceAttribute`
CHECK:            unique name: `.?AUevent_sourceAttribute@__vc_attributes@@`
CHECK:            vtable: <no type>, base list: <no type>, field list: <no type>
CHECK:            options: forward ref (-> 0x1016) | has unique name, sizeof 0
CHECK:   0x1016 | LF_STRUCTURE [size = 108, unreferenced] `__vc_attributes::event_sourceAttribute`
CHECK:            unique name: `.?AUevent_sourceAttribute@__vc_attributes@@`
CHECK:            vtable: <no type>, base list: <no type>, field list: 0x1015
CHECK:            options: has ctor / dtor | contains nested class | has unique name, sizeof 12
Mar 21 2019, 8:54 AM · Restricted Project

Mar 20 2019

zturner accepted D59620: [llvm-pdbutil] Add -type-ref-stats to help find unused type info.

If we ever wanted more aggressive pruning of dead type information, it probably makes sense to do that as a post-processing step where we re-write the PDB, something like an llvm-pdbutil gc subcommand.

Mar 20 2019, 4:27 PM · Restricted Project
zturner created D59611: Move the rest of the section loading over to DWARFContext.
Mar 20 2019, 1:57 PM · Restricted Project
zturner committed rG6e66512758d7: Introduce DWARFContext. (authored by zturner).
Introduce DWARFContext.
Mar 20 2019, 1:49 PM
zturner committed rL356612: Introduce DWARFContext..
Introduce DWARFContext.
Mar 20 2019, 1:48 PM
zturner committed rLLDB356612: Introduce DWARFContext..
Introduce DWARFContext.
Mar 20 2019, 1:48 PM
zturner closed D59562: [SymbolFileDWARF] Introduce DWARFContext.
Mar 20 2019, 1:48 PM · Restricted Project
zturner added inline comments to D59562: [SymbolFileDWARF] Introduce DWARFContext.
Mar 20 2019, 1:40 PM · Restricted Project
zturner added inline comments to D59562: [SymbolFileDWARF] Introduce DWARFContext.
Mar 20 2019, 1:21 PM · Restricted Project
zturner updated the diff for D59562: [SymbolFileDWARF] Introduce DWARFContext.

Updated based on suggestions, including removal of the m_dwarf_data member variable which holds the contents of the __DWARF segment on MachO.

Mar 20 2019, 9:32 AM · Restricted Project
zturner added inline comments to D59562: [SymbolFileDWARF] Introduce DWARFContext.
Mar 20 2019, 8:15 AM · Restricted Project

Mar 19 2019

zturner updated the diff for D59562: [SymbolFileDWARF] Introduce DWARFContext.

I went ahead and just removed the const get version entirely, while changing the other function name to getOrLoad as you suggested. I have another patch while I'll upload after this one that converts all of the rest of the functions (except for the virtual ones required for DWO support), and the const version of the function was literally never needed, except in one place that was itself dead code. So, in the spirit of YAGNI, it's gone until it demonstrates a need.

Mar 19 2019, 5:23 PM · Restricted Project
zturner added inline comments to D59562: [SymbolFileDWARF] Introduce DWARFContext.
Mar 19 2019, 3:19 PM · Restricted Project
zturner created D59562: [SymbolFileDWARF] Introduce DWARFContext.
Mar 19 2019, 2:18 PM · Restricted Project
zturner committed rG611d1f98c587: Delete more dead code. (authored by zturner).
Delete more dead code.
Mar 19 2019, 1:08 PM
zturner committed rL356509: Delete more dead code..
Delete more dead code.
Mar 19 2019, 1:07 PM
zturner committed rLLDB356509: Delete more dead code..
Delete more dead code.
Mar 19 2019, 1:07 PM
zturner committed rG2face4f68b96: Remove some dead DWARF enum -> string conversion functions. (authored by zturner).
Remove some dead DWARF enum -> string conversion functions.
Mar 19 2019, 11:32 AM
zturner committed rL356495: Remove some dead DWARF enum -> string conversion functions..
Remove some dead DWARF enum -> string conversion functions.
Mar 19 2019, 11:31 AM
zturner committed rLLDB356495: Remove some dead DWARF enum -> string conversion functions..
Remove some dead DWARF enum -> string conversion functions.
Mar 19 2019, 11:31 AM
zturner committed rGaea09858142f: Delete dead code. (authored by zturner).
Delete dead code.
Mar 19 2019, 11:06 AM
zturner committed rL356490: Delete dead code..
Delete dead code.
Mar 19 2019, 11:06 AM
zturner committed rLLDB356490: Delete dead code..
Delete dead code.
Mar 19 2019, 11:05 AM
zturner closed D59276: Delete dead code.
Mar 19 2019, 11:05 AM · Restricted Project
zturner accepted D59291: [Object] Add basic minidump support.

This LGTM, but let's give it a day to see if anyone else chimes in with comments.

Mar 19 2019, 10:48 AM · Restricted Project
zturner committed rG66158c00f949: Remove a couple of log statements. (authored by zturner).
Remove a couple of log statements.
Mar 19 2019, 9:26 AM
zturner committed rL356469: Remove a couple of log statements..
Remove a couple of log statements.
Mar 19 2019, 9:25 AM
zturner committed rLLDB356469: Remove a couple of log statements..
Remove a couple of log statements.
Mar 19 2019, 9:25 AM
zturner closed D59498: [DWARF] Remove a couple of log statements.
Mar 19 2019, 9:25 AM · Restricted Project

Mar 18 2019

zturner accepted D59502: [DebugInfo][PDB] Don't write empty debug streams.
Mar 18 2019, 11:42 AM · Restricted Project
zturner added a comment to D59498: [DWARF] Remove a couple of log statements.

In all cases, I think the question worth asking is not "could it be used for X", but rather "how often is it actually used for X". Otherwise, it's just technical debt IMO. There's a lot of things that are possible in theory, but unless it exhibits value in practice, YAGNI.

Mar 18 2019, 10:58 AM · Restricted Project
zturner created D59498: [DWARF] Remove a couple of log statements.
Mar 18 2019, 10:05 AM · Restricted Project
zturner added a comment to D59276: Delete dead code.

ping

Mar 18 2019, 9:16 AM · Restricted Project
zturner added a comment to D59430: Update DwarfDebugInfoEntry to use llvm::Error and llvm::Expected.

ping

Mar 18 2019, 9:16 AM

Mar 15 2019

zturner added a comment to D59433: Fix UUID decoding from minidump files..

"MinidumpNew" is a little bit vague. What's "new" about it? Is there a way we could come up with a better name?

Mar 15 2019, 2:38 PM · Restricted Project
zturner added a comment to D59427: [lldb] [Reproducer] Move SBRegistry registration into declaring files.

Or better yet, make it a static method on each SB class. E.g. SBTarget::InitializeReproducerRegistry(); etc, one for each class.

Mar 15 2019, 1:44 PM · Restricted Project
zturner added inline comments to D59430: Update DwarfDebugInfoEntry to use llvm::Error and llvm::Expected.
Mar 15 2019, 1:38 PM