Page MenuHomePhabricator

alvinhochun (Alvin Wong)
User

Projects

User does not belong to any projects.

User Details

User Since
May 25 2022, 2:21 AM (12 w, 10 h)

Recent Activity

Wed, Aug 10

alvinhochun added a comment to D131159: [lldb] Use WSAEventSelect for MainLoop polling on windows.

I gave this a spin with LLDB_USE_LLDB_SERVER=1, but there looks to be some pre-existing issues with the lldb-server implementation so I can't really test much normally using builds of Krita:

Wed, Aug 10, 4:08 AM · Restricted Project, Restricted Project

Jun 30 2022

alvinhochun added a comment to D128541: [WIP][lldb][windows] Handle OutputDebugString from debuggee.

Well.. most OSes don't have this kind of functionality, so we don't really have an exact match for this. I suppose the closest thing would be the way we handle darwin OS logs, so you could try to see if reusing some of that infrastructure makes sense (StructuredDataDarwinLog.cpp and surrounding code).

Jun 30 2022, 7:45 AM · Restricted Project, Restricted Project

Jun 29 2022

alvinhochun published D128541: [WIP][lldb][windows] Handle OutputDebugString from debuggee for review.
Jun 29 2022, 8:46 AM · Restricted Project, Restricted Project

Jun 27 2022

alvinhochun added a comment to D128600: [libc++][mingw] Remove setlocale from snprintf_l.

I guess the more complete/proper way forward would make a mingw-w64 specific implementation of these (or some similar) functions too, if __USE_MINGW_ANSI_STDIO is set to 1. (No idea offhand how hard that would be though...)

Jun 27 2022, 2:21 AM · Restricted Project, Restricted Project

Jun 26 2022

alvinhochun added a comment to D128600: [libc++][mingw] Remove setlocale from snprintf_l.

long double is an issue though...

Jun 26 2022, 2:05 AM · Restricted Project, Restricted Project
alvinhochun planned changes to D128600: [libc++][mingw] Remove setlocale from snprintf_l.
Jun 26 2022, 2:02 AM · Restricted Project, Restricted Project
alvinhochun published D128600: [libc++][mingw] Remove setlocale from snprintf_l for review.

This is an alternative of D59525 and D59727 for mingw. I think this implementation using _vsnprintf_s_l and _vscprintf_l should replicate the expected behaviour of snprintf_l, with NULL terminator and such. @mstorsjo should be able to confirm whether These two functions are available on both UCRT and MSVCRT configuration of mingw.

Jun 26 2022, 2:01 AM · Restricted Project, Restricted Project

Jun 23 2022

alvinhochun added inline comments to D128410: [lldb] Add a testcase for nested exceptions on Windows.
Jun 23 2022, 7:31 AM · Restricted Project, Restricted Project
alvinhochun added inline comments to D128410: [lldb] Add a testcase for nested exceptions on Windows.
Jun 23 2022, 6:39 AM · Restricted Project, Restricted Project
alvinhochun added a comment to D128410: [lldb] Add a testcase for nested exceptions on Windows.

It may be possible to stuff a pointer to an EXCEPTION_RECORD into another EXCEPTION_RECORD and use RtlRaiseException to generate the exception, but you'll have to test how it actually works.

Jun 23 2022, 6:18 AM · Restricted Project, Restricted Project

Jun 21 2022

alvinhochun updated the diff for D127436: [lldb] Resolve exe location for `target create`.

Added Windows-specific test

Jun 21 2022, 9:28 AM · Restricted Project, Restricted Project
alvinhochun updated the diff for D127234: [lldb] Add setting to override PE/COFF ABI by module name.

Added test and improved setting description as suggested.

Jun 21 2022, 9:18 AM · Restricted Project, Restricted Project
alvinhochun added a comment to D128268: [lldb] Fix reading i686-windows executables with GNU environment.

Yes, this (patch) looks right to me.

Jun 21 2022, 7:00 AM · Restricted Project, Restricted Project

Jun 20 2022

alvinhochun updated the diff for D128201: [lldb][windows] Fix crash on getting nested exception.

Remove old code instead of #if 0.

Jun 20 2022, 9:37 AM · Restricted Project, Restricted Project
alvinhochun added inline comments to D127234: [lldb] Add setting to override PE/COFF ABI by module name.
Jun 20 2022, 9:26 AM · Restricted Project, Restricted Project
alvinhochun added a comment to D128201: [lldb][windows] Fix crash on getting nested exception.

Any reason to #if 0 this instead of just removing it and maybe adding a one line comment like "nested exceptions are not supported"? So that someone can git blame that and find this commit with the removal.

Jun 20 2022, 9:17 AM · Restricted Project, Restricted Project
alvinhochun requested review of D128201: [lldb][windows] Fix crash on getting nested exception.
Jun 20 2022, 6:40 AM · Restricted Project, Restricted Project

Jun 18 2022

alvinhochun updated the diff for D127234: [lldb] Add setting to override PE/COFF ABI by module name.

Rebased

Jun 18 2022, 8:40 AM · Restricted Project, Restricted Project

Jun 15 2022

alvinhochun added a comment to D126367: [lldb] Add gnu-debuglink support for Windows PE/COFF.

Is there any difference in functionality between SymbolVendorELF and the new class introduced here? Could this have been achieved by teaching SymbolVendorELF (after renaming it to something else) to handle COFF files as well?

Jun 15 2022, 7:06 AM · Restricted Project, Restricted Project

Jun 10 2022

alvinhochun added a comment to D127436: [lldb] Resolve exe location for `target create`.

Does this test look good:

Jun 10 2022, 12:03 PM · Restricted Project, Restricted Project
alvinhochun added a comment to D127436: [lldb] Resolve exe location for `target create`.

I suppose it is possible to have a Windows-only test for this. (Someone will need to verify them for me though as I don't have a build that runs tests on Windows.)

Jun 10 2022, 11:11 AM · Restricted Project, Restricted Project

Jun 9 2022

alvinhochun requested review of D127436: [lldb] Resolve exe location for `target create`.
Jun 9 2022, 12:32 PM · Restricted Project, Restricted Project
alvinhochun updated the diff for D127234: [lldb] Add setting to override PE/COFF ABI by module name.

Rebased patch

Jun 9 2022, 10:30 AM · Restricted Project, Restricted Project
alvinhochun updated the diff for D127048: [lldb] Set COFF module ABI from default triple and make it an option.

Rebased patch

Jun 9 2022, 10:29 AM · Restricted Project, Restricted Project
alvinhochun added a comment to D127345: [COFF] Don't reject executables with data directories pointing outside of provided data.

I agree with this change like I said in the linked review thread.

Jun 9 2022, 5:07 AM · Restricted Project, Restricted Project
alvinhochun added a comment to D126367: [lldb] Add gnu-debuglink support for Windows PE/COFF.

Ah I did not realize that GNU ld also has the option to add the same build id for mingw. I am fine with you committing these changes. Thanks!

Jun 9 2022, 4:00 AM · Restricted Project, Restricted Project

Jun 8 2022

alvinhochun updated the diff for D126367: [lldb] Add gnu-debuglink support for Windows PE/COFF.

Added the fix to the Minidump find-module test, also updated the commit message.

Jun 8 2022, 9:36 AM · Restricted Project, Restricted Project
alvinhochun added a comment to D127048: [lldb] Set COFF module ABI from default triple and make it an option.

Thanks @mstorsjo for answering for me.

Jun 8 2022, 7:13 AM · Restricted Project, Restricted Project
alvinhochun added a comment to D126898: [COFF] Check table ptr more thoroughly and ignore empty sections.

I guess you're right. MSVC's dumpbin /relocations helper.exe listed nothing at all.

Jun 8 2022, 6:33 AM · Restricted Project, Restricted Project
alvinhochun added a comment to D126898: [COFF] Check table ptr more thoroughly and ignore empty sections.

Yeah, that seems fine as a workaround. https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#section-table-section-headers says:

Jun 8 2022, 6:19 AM · Restricted Project, Restricted Project

Jun 7 2022

alvinhochun requested review of D127234: [lldb] Add setting to override PE/COFF ABI by module name.
Jun 7 2022, 10:37 AM · Restricted Project, Restricted Project
alvinhochun updated the diff for D127048: [lldb] Set COFF module ABI from default triple and make it an option.

Removed the changes for PDB, I don't think they actually affect anything.

Jun 7 2022, 10:24 AM · Restricted Project, Restricted Project
alvinhochun added a comment to D126367: [lldb] Add gnu-debuglink support for Windows PE/COFF.

The test https://github.com/llvm/llvm-project/blob/main/lldb/test/Shell/Minidump/Windows/find-module.test fails with this patch. That test opens a minidump and checks that the associated exe is loaded. The minidump contains a codeview PDB record for the exe which is used to generate the UUID, but the same codeview PDB record is missing from the exe. The test still worked because LLDB ignores the empty UUID (it skips the UUID equality check). However, when this patch adds a UUID using the CRC, that test fails because the UUIDs no longer match up.

Jun 7 2022, 9:55 AM · Restricted Project, Restricted Project
alvinhochun planned changes to D126367: [lldb] Add gnu-debuglink support for Windows PE/COFF.

Sorry, I just realized the crc change broke a test.

Jun 7 2022, 7:11 AM · Restricted Project, Restricted Project
alvinhochun updated the diff for D126367: [lldb] Add gnu-debuglink support for Windows PE/COFF.

Applied suggested change

Jun 7 2022, 6:29 AM · Restricted Project, Restricted Project
alvinhochun added a comment to D127048: [lldb] Set COFF module ABI from default triple and make it an option.

Thanks for the hint. I think I can add a setting, say plugin.object-file.pe-coff.abi. It needs some plumbing but should be doable.

Jun 7 2022, 1:06 AM · Restricted Project, Restricted Project

Jun 6 2022

alvinhochun updated the diff for D126367: [lldb] Add gnu-debuglink support for Windows PE/COFF.

Addressed comments, added CRC checking for debuglink (only applies if the object does not contain a PDB build id) and added tests for this.

Jun 6 2022, 12:52 PM · Restricted Project, Restricted Project
alvinhochun added inline comments to D126367: [lldb] Add gnu-debuglink support for Windows PE/COFF.
Jun 6 2022, 10:26 AM · Restricted Project, Restricted Project
alvinhochun planned changes to D126367: [lldb] Add gnu-debuglink support for Windows PE/COFF.

Can you include some links to documentation of the debuglink feature in the commit message? I assume https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html is what you'd want.

Jun 6 2022, 8:04 AM · Restricted Project, Restricted Project
alvinhochun added a comment to D127048: [lldb] Set COFF module ABI from default triple and make it an option.

This changes the PE/COFF and PDB plugins to set the module triple according to the default target triple used to build LLDB.

I'm missing some context here but using triple used when *building* lldb seems to conflict with the idea that the same lldb (client at least) can be used to debug many architectures.

Yes, that's true. The idea here is that when doing local debugging in either the mingw or msvc ecosystems, the flavour of the lldb build itself could be a decent hint - but it's not indeed not a correct and faultproof fix.

Jun 6 2022, 5:53 AM · Restricted Project, Restricted Project

Jun 5 2022

alvinhochun updated the diff for D127048: [lldb] Set COFF module ABI from default triple and make it an option.

Fixed tests again

Jun 5 2022, 5:19 AM · Restricted Project, Restricted Project
alvinhochun updated the diff for D127048: [lldb] Set COFF module ABI from default triple and make it an option.

Changed test requirement to be more accurate

Jun 5 2022, 4:05 AM · Restricted Project, Restricted Project
alvinhochun updated the diff for D127048: [lldb] Set COFF module ABI from default triple and make it an option.

Fixed tests

Jun 5 2022, 3:57 AM · Restricted Project, Restricted Project
alvinhochun published D127048: [lldb] Set COFF module ABI from default triple and make it an option for review.
Jun 5 2022, 3:41 AM · Restricted Project, Restricted Project
alvinhochun updated the diff for D126367: [lldb] Add gnu-debuglink support for Windows PE/COFF.

Debug--

Jun 5 2022, 1:59 AM · Restricted Project, Restricted Project
alvinhochun updated the diff for D126367: [lldb] Add gnu-debuglink support for Windows PE/COFF.

Fixed loading gnu-debuglink for x86 Windows and added a test for it.

Jun 5 2022, 1:56 AM · Restricted Project, Restricted Project

Jun 3 2022

alvinhochun updated the diff for D126898: [COFF] Check table ptr more thoroughly and ignore empty sections.

Applied suggestion to make code less clunky.

Jun 3 2022, 7:16 AM · Restricted Project, Restricted Project

Jun 2 2022

alvinhochun abandoned D126787: [llvm-objdump][COFF] Remove duplicate data dir loading.

Replacing with https://reviews.llvm.org/D126898

Jun 2 2022, 10:42 AM · Restricted Project, Restricted Project
alvinhochun abandoned D126786: [Object][COFF] Add table ptr checks but don't hard-error.

Replacing with https://reviews.llvm.org/D126898

Jun 2 2022, 10:42 AM · Restricted Project, Restricted Project
alvinhochun published D126898: [COFF] Check table ptr more thoroughly and ignore empty sections for review.
Jun 2 2022, 10:41 AM · Restricted Project, Restricted Project
alvinhochun planned changes to D126787: [llvm-objdump][COFF] Remove duplicate data dir loading.
Jun 2 2022, 1:48 AM · Restricted Project, Restricted Project
alvinhochun planned changes to D126786: [Object][COFF] Add table ptr checks but don't hard-error.
Jun 2 2022, 1:48 AM · Restricted Project, Restricted Project

Jun 1 2022

alvinhochun published D126787: [llvm-objdump][COFF] Remove duplicate data dir loading for review.
Jun 1 2022, 9:33 AM · Restricted Project, Restricted Project
alvinhochun published D126786: [Object][COFF] Add table ptr checks but don't hard-error for review.
Jun 1 2022, 9:32 AM · Restricted Project, Restricted Project

May 31 2022

alvinhochun added inline comments to D126367: [lldb] Add gnu-debuglink support for Windows PE/COFF.
May 31 2022, 6:04 AM · Restricted Project, Restricted Project
alvinhochun added inline comments to D126367: [lldb] Add gnu-debuglink support for Windows PE/COFF.
May 31 2022, 5:30 AM · Restricted Project, Restricted Project
alvinhochun added inline comments to D126657: [lldb] Fix loading DLL from some ramdisk on Windows.
May 31 2022, 5:21 AM · Restricted Project, Restricted Project

May 30 2022

alvinhochun requested review of D126657: [lldb] Fix loading DLL from some ramdisk on Windows.
May 30 2022, 8:27 AM · Restricted Project, Restricted Project

May 28 2022

alvinhochun updated the diff for D126367: [lldb] Add gnu-debuglink support for Windows PE/COFF.

Changed GetPluginNameStatic to "PE-COFF", and rebased onto main.

May 28 2022, 7:32 AM · Restricted Project, Restricted Project

May 25 2022

alvinhochun updated alvinhochun.
May 25 2022, 8:48 AM
alvinhochun published D126367: [lldb] Add gnu-debuglink support for Windows PE/COFF for review.
May 25 2022, 8:37 AM · Restricted Project, Restricted Project