Page MenuHomePhabricator

zturner (Zachary Turner)
User

Projects

User does not belong to any projects.

User Details

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

Recent Activity

Thu, Oct 10

zturner committed rG79f243296654: [MSVC] Automatically add atlmfc folder to include and libpath. (authored by zturner).
[MSVC] Automatically add atlmfc folder to include and libpath.
Thu, Oct 10, 1:27 PM
zturner committed rG02c53868116d: [PDB] Fix bug when using multiple PCH header objects with the same name. (authored by zturner).
[PDB] Fix bug when using multiple PCH header objects with the same name.
Thu, Oct 10, 1:27 PM
zturner closed D68736: [MSVC] Automatically add atlmfc include and lib directories as system paths..
Thu, Oct 10, 1:27 PM · Restricted Project
zturner closed D66431: [PDB] Fix bug when using multiple PCH header objects with the same name..
Thu, Oct 10, 1:27 PM · Restricted Project
zturner committed rL374443: [MSVC] Automatically add atlmfc folder to include and libpath..
[MSVC] Automatically add atlmfc folder to include and libpath.
Thu, Oct 10, 1:26 PM
zturner committed rL374442: [PDB] Fix bug when using multiple PCH header objects with the same name..
[PDB] Fix bug when using multiple PCH header objects with the same name.
Thu, Oct 10, 1:26 PM
zturner added a comment to D29039: [clang-format] Proposal for clang-format -r option.

In Windows you just write a Python script to do this, and this works everywhere, not just on one platform or the other, so bash isn't even necessary and Python is easy to write so I wouldn't really say it's "even harder". If you google for run-clang-format.py you'll find a script that actually branches out and does this in parallel. There's a lot of logic and smarts you could bake into an external tool which can then be used for many different programs, not just clang-format.

Thu, Oct 10, 9:45 AM · Restricted Project, Restricted Project, Restricted Project
zturner added a comment to D66431: [PDB] Fix bug when using multiple PCH header objects with the same name..

Planning to commit this this afternoon unless someone has objections.

Thu, Oct 10, 9:36 AM · Restricted Project

Wed, Oct 9

zturner added a comment to D68736: [MSVC] Automatically add atlmfc include and lib directories as system paths..

This matches the behavior of cl.

Are you sure? In a bare environment, cl.exe doesn't include any system paths, not even to the standard library. It actually uses the INCLUDE environment variable for those paths. Granted, VCVARSALL sets that (and other environment variables), but it's not innate behavior of cl.exe.

Wed, Oct 9, 3:43 PM · Restricted Project
zturner created D68736: [MSVC] Automatically add atlmfc include and lib directories as system paths..
Wed, Oct 9, 2:52 PM · Restricted Project
zturner updated the diff for D66431: [PDB] Fix bug when using multiple PCH header objects with the same name..

Rebased this onto tip of trunk. I'm *finally* going to submit this.

Wed, Oct 9, 2:25 PM · Restricted Project

Mon, Oct 7

zturner closed D13617: Fix ref-counting of Python objects.
Mon, Oct 7, 7:35 AM · Restricted Project
zturner closed D17492: Case sensitive path compare on Windows breaks breakpoints.
Mon, Oct 7, 7:11 AM · Restricted Project
zturner closed D19445: Refactor some more PDB reading code into DebugInfoPDB.
Mon, Oct 7, 7:04 AM · Restricted Project
zturner closed D19634: Read the rest of the substreams from DBI, and parse source file information.
Mon, Oct 7, 7:04 AM · Restricted Project
zturner closed D27780: Make OptionDefinition structure store a StringRef.
Mon, Oct 7, 6:36 AM · Restricted Project

Tue, Sep 24

zturner added a reviewer for D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style): krasimir.

What's the status of this patch, out of curiosity? It doesn't seem there were any objections to the original idea, just that nobody with ownership over clang-format is still actively participating in the review.

Tue, Sep 24, 1:14 PM · Restricted Project, Restricted Project

Sep 4 2019

zturner added inline comments to D67168: [Windows] Add support of watchpoints to `ProcessWindows`.
Sep 4 2019, 4:01 PM · Restricted Project, Restricted Project

Aug 26 2019

zturner added a comment to D66431: [PDB] Fix bug when using multiple PCH header objects with the same name..

Finally got around to trying to commit this.

Aug 26 2019, 10:06 AM · Restricted Project

Aug 19 2019

zturner added a comment to D66431: [PDB] Fix bug when using multiple PCH header objects with the same name..

Ugh nevermind, you can't because of the binary files. Fineeeeee.

Send the binaries to my email.

Aug 19 2019, 3:47 PM · Restricted Project
zturner added a comment to D66431: [PDB] Fix bug when using multiple PCH header objects with the same name..

Ugh nevermind, you can't because of the binary files. Fineeeeee.

Aug 19 2019, 3:31 PM · Restricted Project
zturner added a comment to D66431: [PDB] Fix bug when using multiple PCH header objects with the same name..

I know it's super lame to request this, but would one of you mind submitting on my behalf? I don't have SVN installed and it seems like git llvm push still requires it (unless there is a more modern workflow that doesn't require SVN anymore). If I find myself submitting more and more patches then I'll bite the bullet.

Aug 19 2019, 3:31 PM · Restricted Project
zturner created D66431: [PDB] Fix bug when using multiple PCH header objects with the same name..
Aug 19 2019, 11:03 AM · Restricted Project

Aug 13 2019

zturner accepted D64939: Add a proposal for a libc project under the LLVM umbrella..

No objections from me on the wording of the layering portion

Aug 13 2019, 4:01 PM · Restricted Project

Jul 16 2019

zturner added inline comments to D64428: Teach `llvm-pdbutil pretty -native` about `-injected-sources`.
Jul 16 2019, 1:32 PM · Restricted Project
zturner added inline comments to D64428: Teach `llvm-pdbutil pretty -native` about `-injected-sources`.
Jul 16 2019, 9:05 AM · Restricted Project

Apr 29 2019

zturner added inline comments to D61277: [PDB] Fix hash function used to write /src/headerblock.
Apr 29 2019, 4:20 PM · Restricted Project
zturner accepted D61277: [PDB] Fix hash function used to write /src/headerblock.
Apr 29 2019, 1:20 PM · Restricted Project

Apr 19 2019

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?

Apr 19 2019, 9:07 PM

Apr 12 2019

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.
Apr 12 2019, 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.
Apr 12 2019, 8:52 AM

Apr 11 2019

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

Apr 10 2019

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

Apr 9 2019

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

Apr 8 2019

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

Apr 5 2019

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

Apr 3 2019

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

Also remove LLDBTriggerable.py

Apr 3 2019, 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.

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

Rebased

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

Apr 2 2019

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

Apr 1 2019

zturner added reviewers for D59862: Add a function for mapping PDBSymbol index IDs to lldb::LangTypes: amccarth, aleksandr.urakov, stella.stamenova.
Apr 1 2019, 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.

Apr 1 2019, 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.

Apr 1 2019, 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?

Apr 1 2019, 1:36 PM
zturner accepted D59819: Make operator==s consistent between c++ and python APIs.
Apr 1 2019, 1:35 PM · Restricted Project
zturner accepted D59849: [lldb-vscode] Add logic to handle EOF when reading from lldb-vscode stdout..
Apr 1 2019, 1:33 PM · Restricted Project, Restricted Project
zturner accepted D60068: PDBFPO: Refactor register reference resolution.
Apr 1 2019, 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

Apr 1 2019, 1:33 PM

Mar 29 2019

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.

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

Mar 28 2019

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;
Mar 28 2019, 4:29 PM · Restricted Project, Restricted Project
zturner accepted D59953: Add .py extension to clang-tools-extra lit cfg files.
Mar 28 2019, 3:26 PM · Restricted Project

Mar 26 2019

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.

Mar 26 2019, 5:25 PM · Restricted Project
zturner accepted D59828: Add lldb-vscode as a dependency of lldb tests..
Mar 26 2019, 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