Page MenuHomePhabricator

aadsm (António Afonso)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 27 2019, 10:34 PM (43 w, 5 d)

Recent Activity

Today

aadsm accepted D75390: Fix GSYM tests to run the yaml files and fix test failures on some machines..
Fri, Feb 28, 5:01 PM · Restricted Project

Jan 23 2020

aadsm added a comment to D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging.

Yeah, I'm not sure why the LoadModules function is calling target.SetExecutableModule. It is true that the libraries-svr4 will not include the main executable in its list.
This code was added in the context of providing qXfer:libraries support here: https://reviews.llvm.org/D9471. I don't see any mention of including the executable on that packet though: https://sourceware.org/gdb/current/onlinedocs/gdb/Library-List-Format.html. @clayborg was the main reviewer there (although this was 5 years ago or so) and he does mention multiple times in the comments this exact issue with calling target.SetExecutableModule. Maybe he can still remember and provide some light here :).

Jan 23 2020, 9:37 PM · Restricted Project

Dec 5 2019

aadsm abandoned D70883: [vscode.py] Make read_packet only return None when EOF.

Fair enough, I haven't seen evidence of this (haven't searched for it) but I imagine IDEs need to ignore this as well otherwise they just barf if they're expecting Content-Length and a wild print appears. The notion of stdout of SBDebugger is the SBCommandReturnObject which doesn't print right away (only when the command finishes executing) and from my previous tests .flush() doesn't help with this. I believe this is the reason why people opt to use print instead in their custom commands. But I don't think it's a reasonable assumption (or api contract) to tell people they can't use print or it breaks lldb-vscode.

Dec 5 2019, 1:31 PM · Restricted Project

Dec 3 2019

aadsm added a comment to D70886: [lldb-vscode] capture the debuggers file handles before lldbinit runs.

Maybe you could do something similar to LocalLLDBInit.test ?

That test uses the lldb -S (and others) flags that lldb-vscode doesn't support :(. These flags should really be added to the initialize packet but they're very specific to lldb and the DAP doesn't support it.. We could implement something like what Driver::ProcessArgs does and pass options through envs but, the logic in ProcessArgs itself is sketchy (just like the comment mentions) and I l also find it odd to pass options through env vars...

Dec 3 2019, 12:25 PM · Restricted Project

Dec 2 2019

aadsm updated the diff for D70882: Add environment var LLDBVSCODE_SKIP_INIT_FILES to lldb-vscode.

Put the logic into a function

Dec 2 2019, 6:22 PM · Restricted Project
António Afonso <aadsm@fb.com> committed rGafd5d912812e: [lldb] Fix TestFormattersSBAPI test (authored by aadsm).
[lldb] Fix TestFormattersSBAPI test
Dec 2 2019, 12:25 PM
aadsm closed D70884: [lldb] Fix TestFormattersSBAPI test.
Dec 2 2019, 12:25 PM · Restricted Project
aadsm retitled D70882: Add environment var LLDBVSCODE_SKIP_INIT_FILES to lldb-vscode from Add skipInitFiles option to lldb-vscode initialize to Add environment var LLDBVSCODE_SKIP_INIT_FILES to lldb-vscode.
Dec 2 2019, 12:25 PM · Restricted Project
aadsm updated the diff for D70882: Add environment var LLDBVSCODE_SKIP_INIT_FILES to lldb-vscode.

Use an env var instead

Dec 2 2019, 12:25 PM · Restricted Project
aadsm updated the diff for D70887: [lldb] Use realpath to avoid issues with symlinks in source paths.

Solve this at the failing test level. We can't be sure of the filename will end up in the debug info so we just add both keys to the mapping.

Dec 2 2019, 11:20 AM · Restricted Project
aadsm added a comment to D70883: [vscode.py] Make read_packet only return None when EOF.

Yes. This happens when lldb-vscode is run in stdin/stdout mode (which is what happens in tests and I've also seen some IDEs doing the same) and installed commands are doing "print". In this case the client gets data that does not start with Content-Length.
This fixes the tests but overall is still a problem for IDEs (but that's another discussion).

Dec 2 2019, 11:11 AM · Restricted Project
aadsm added a comment to D70885: [lldb] Use explicit lldb commands on tests.

Yeah, that's what I do in D70882. I still think tests can be more robust by using explicit lldb command names but don't really care much :). I'm happy to abandon it.

Dec 2 2019, 11:10 AM · Restricted Project
aadsm added inline comments to D70884: [lldb] Fix TestFormattersSBAPI test.
Dec 2 2019, 11:10 AM · Restricted Project
aadsm planned changes to D70882: Add environment var LLDBVSCODE_SKIP_INIT_FILES to lldb-vscode.

Yes, I'll change this to env it makes more sense.

Dec 2 2019, 11:02 AM · Restricted Project
aadsm added a comment to D70886: [lldb-vscode] capture the debuggers file handles before lldbinit runs.

The way phabricator shows the diff is tricky, this change has nothing to do with D70882 and stands by itself. The important part here is making the g_vsc.debugger.SetOutputFileHandle(out, true); g_vsc.debugger.SetErrorFileHandle(out, false); happen before the debugger creation. Not sure how to create a test for this though since there's no mechanism to give lldb-vscode an initial file to load...

Dec 2 2019, 11:01 AM · Restricted Project

Dec 1 2019

aadsm created D70887: [lldb] Use realpath to avoid issues with symlinks in source paths.
Dec 1 2019, 8:54 PM · Restricted Project
aadsm updated the summary of D70886: [lldb-vscode] capture the debuggers file handles before lldbinit runs.
Dec 1 2019, 8:54 PM · Restricted Project
aadsm created D70886: [lldb-vscode] capture the debuggers file handles before lldbinit runs.
Dec 1 2019, 8:47 PM · Restricted Project
aadsm created D70885: [lldb] Use explicit lldb commands on tests.
Dec 1 2019, 8:45 PM · Restricted Project
aadsm created D70884: [lldb] Fix TestFormattersSBAPI test.
Dec 1 2019, 8:45 PM · Restricted Project
aadsm created D70883: [vscode.py] Make read_packet only return None when EOF.
Dec 1 2019, 8:36 PM · Restricted Project
aadsm updated the diff for D70882: Add environment var LLDBVSCODE_SKIP_INIT_FILES to lldb-vscode.

Oops, wrnog default

Dec 1 2019, 7:18 PM · Restricted Project
aadsm created D70882: Add environment var LLDBVSCODE_SKIP_INIT_FILES to lldb-vscode.
Dec 1 2019, 7:15 PM · Restricted Project

Nov 15 2019

aadsm accepted D70252: [Docs] Add Python caveats under the development section.
Nov 15 2019, 7:02 PM · Restricted Project

Nov 14 2019

aadsm added a comment to D70252: [Docs] Add Python caveats under the development section.

Thank you for writing this up! I was thinking how I would find this.. I don't see myself clicking on the "Caveats" link (could also be a me problem though). Could we also add a link to it in this section? https://lldb.llvm.org/resources/build.html#id22. Something like "NOTE: You need to use the python binary you built with, check caveats to learn more"?

Nov 14 2019, 12:07 PM · Restricted Project

Nov 11 2019

aadsm updated the diff for D69931: Add rpath to liblldb so vendors can ship their own python framework (or others).

Clarify the point of the install_path

Nov 11 2019, 1:34 PM · Restricted Project
aadsm updated the summary of D69931: Add rpath to liblldb so vendors can ship their own python framework (or others).
Nov 11 2019, 10:22 AM · Restricted Project
aadsm retitled D69931: Add rpath to liblldb so vendors can ship their own python framework (or others) from Add cmake variables to specify a python framework to ship with lldb to Add rpath to liblldb so vendors can ship their own python framework (or others).
Nov 11 2019, 10:22 AM · Restricted Project

Nov 10 2019

aadsm added a comment to D69931: Add rpath to liblldb so vendors can ship their own python framework (or others).

The proposed path in this patch, -rpath "@loader_path/../../../", uses the @loader_path expansion which is the directory containing the binary that the load command is in (in this case liblldb's directory). Popping 3 directories up from that is likely not sane in most build configurations, but if it works for you meh...

Nov 10 2019, 10:52 PM · Restricted Project
aadsm updated the diff for D69931: Add rpath to liblldb so vendors can ship their own python framework (or others).

Updating to only add an rpath that points to the directory where LLDB.frameworks gets installed.

Nov 10 2019, 10:34 PM · Restricted Project

Nov 8 2019

aadsm added a comment to D69931: Add rpath to liblldb so vendors can ship their own python framework (or others).

That should work fine yeah. It should be a matter of adding "@loader_path/../../../" to the rpath.

Nov 8 2019, 9:49 AM · Restricted Project

Nov 6 2019

aadsm created D69931: Add rpath to liblldb so vendors can ship their own python framework (or others).
Nov 6 2019, 10:52 PM · Restricted Project
aadsm added a comment to D69589: [lldb] Refactor all POST_BUILD commands into targets.

Yeah, weird. I wonder if this is something cmake does implicitly when the target is defined as FRAMEWORK: https://cmake.org/cmake/help/latest/prop_tgt/FRAMEWORK.html

Nov 6 2019, 3:08 PM · Restricted Project

Nov 5 2019

aadsm added a comment to D69589: [lldb] Refactor all POST_BUILD commands into targets.

@hhb I just did, and get the same error as well :(
ninja: error: 'bin/LLDB.framework/LLDB', needed by 'bin/LLDB.framework/Resources/Python/lldb/_lldb.so', missing and no known rule to make it

Nov 5 2019, 3:51 PM · Restricted Project

Nov 4 2019

aadsm added a comment to D69589: [lldb] Refactor all POST_BUILD commands into targets.

@hhb fwiw, I still get the same error with this diff (after applying it on top of D69834). But D69834 by itself works great!

Nov 4 2019, 11:00 PM · Restricted Project
aadsm accepted D69589: [lldb] Refactor all POST_BUILD commands into targets.

This is great! it's so much better. Thank so much for looking into this and fixing it.

Nov 4 2019, 6:56 PM · Restricted Project
aadsm accepted D69834: [lldb] Add a install target for lldb python on darwin.
Nov 4 2019, 6:56 PM · Restricted Project

Nov 3 2019

aadsm requested changes to D69589: [lldb] Refactor all POST_BUILD commands into targets.

I'm sorry to reject but this diff breaks install-distribution on Darwin. Here's how to repro:

Nov 3 2019, 3:30 PM · Restricted Project

Oct 9 2019

aadsm committed rG70aa6fb6e301: Update breakpad lit test to be independent of the unnamed symbol number (authored by aadsm).
Update breakpad lit test to be independent of the unnamed symbol number
Oct 9 2019, 11:08 AM
aadsm committed rL374192: Update breakpad lit test to be independent of the unnamed symbol number.
Update breakpad lit test to be independent of the unnamed symbol number
Oct 9 2019, 11:08 AM
aadsm added a comment to D68533: Explicitly set entry point arch when it's thumb [Second Try].

@shafik I just pushed a fix, the issue was because on mac there are more unnamed symbols so the number didn't match, I changed it to match any number since this can easily change.

Oct 9 2019, 11:08 AM · Restricted Project
aadsm added a comment to D68533: Explicitly set entry point arch when it's thumb [Second Try].

@shafik thanks, checking.

Oct 9 2019, 10:18 AM · Restricted Project

Oct 8 2019

aadsm committed rGad6690afa3e6: Explicitly set entry point arch when it's thumb [Second Try] (authored by aadsm).
Explicitly set entry point arch when it's thumb [Second Try]
Oct 8 2019, 4:47 PM
aadsm closed D68533: Explicitly set entry point arch when it's thumb [Second Try].
Oct 8 2019, 4:47 PM · Restricted Project
aadsm committed rL374132: Explicitly set entry point arch when it's thumb [Second Try].
Explicitly set entry point arch when it's thumb [Second Try]
Oct 8 2019, 4:47 PM

Oct 7 2019

aadsm committed rGffc67f92514c: Fixing missing lldb-scripts rename from D68370 (authored by aadsm).
Fixing missing lldb-scripts rename from D68370
Oct 7 2019, 10:25 PM
aadsm committed rL374005: Fixing missing lldb-scripts rename from D68370.
Fixing missing lldb-scripts rename from D68370
Oct 7 2019, 10:25 PM
aadsm updated the diff for D68533: Explicitly set entry point arch when it's thumb [Second Try].

Don't destroy the Breakpad test purpose.

Oct 7 2019, 5:40 PM · Restricted Project

Oct 4 2019

aadsm created D68533: Explicitly set entry point arch when it's thumb [Second Try].
Oct 4 2019, 6:43 PM · Restricted Project
aadsm committed rGf6bedd81cca5: Componentize lldb/scripts to use with LLVM_DISTRIBUTION_COMPONENTS (authored by aadsm).
Componentize lldb/scripts to use with LLVM_DISTRIBUTION_COMPONENTS
Oct 4 2019, 11:11 AM
aadsm committed rL373768: Componentize lldb/scripts to use with LLVM_DISTRIBUTION_COMPONENTS.
Componentize lldb/scripts to use with LLVM_DISTRIBUTION_COMPONENTS
Oct 4 2019, 11:10 AM
aadsm closed D68370: Componentize lldb/scripts to use with LLVM_DISTRIBUTION_COMPONENTS.
Oct 4 2019, 11:10 AM · Restricted Project, Restricted Project
aadsm added a comment to D68069: Explicitly set entry point arch when it's thumb.

Ok. Initially I thought that with the entry point we were making big assumptions there but after reading the parse unwind symbols I guess it's really no big difference.
I guess my main concern is that the user can no longer create symbols within the span of the entry point symbol, even if they happen to know better (it's not even possible to manually remove symbols). But like you said, the same is true with the other synthetic symbols..

Oct 4 2019, 8:35 AM · Restricted Project, Restricted Project

Oct 3 2019

aadsm added a comment to D68069: Explicitly set entry point arch when it's thumb.

I ended reverting this because of SymbolFile/Breakpad/symtab.test. It seems that in this test we add symbols after the synthetic entry point symbol is added creating confusion.
I think I'll need to change the code that adds symbols in Symtab to explicitly check if we're overlapping the synthetic entry point and reduce the entry point or remove it in the case it overlaps at the beginning.

Oct 3 2019, 6:59 PM · Restricted Project, Restricted Project
aadsm committed rGae08e479aad9: Revert "Explicitly set entry point arch when it's thumb" (authored by aadsm).
Revert "Explicitly set entry point arch when it's thumb"
Oct 3 2019, 6:46 PM
aadsm committed rL373687: Revert "Explicitly set entry point arch when it's thumb".
Revert "Explicitly set entry point arch when it's thumb"
Oct 3 2019, 6:46 PM
aadsm committed rGac146958041c: Explicitly set entry point arch when it's thumb (authored by aadsm).
Explicitly set entry point arch when it's thumb
Oct 3 2019, 5:12 PM
aadsm committed rL373680: Explicitly set entry point arch when it's thumb.
Explicitly set entry point arch when it's thumb
Oct 3 2019, 5:09 PM
aadsm closed D68069: Explicitly set entry point arch when it's thumb.
Oct 3 2019, 5:09 PM · Restricted Project, Restricted Project
aadsm updated the diff for D68370: Componentize lldb/scripts to use with LLVM_DISTRIBUTION_COMPONENTS.

Rename lldb-scripts to lldb-python-scripts

Oct 3 2019, 2:20 PM · Restricted Project, Restricted Project

Oct 2 2019

aadsm updated the diff for D68069: Explicitly set entry point arch when it's thumb.

Remove .global _Start

Oct 2 2019, 10:26 PM · Restricted Project, Restricted Project
aadsm created D68370: Componentize lldb/scripts to use with LLVM_DISTRIBUTION_COMPONENTS.
Oct 2 2019, 7:25 PM · Restricted Project, Restricted Project
aadsm updated the diff for D68069: Explicitly set entry point arch when it's thumb.

Update comment and test

Oct 2 2019, 9:34 AM · Restricted Project, Restricted Project
aadsm added a comment to D68069: Explicitly set entry point arch when it's thumb.

I actually just completely missed the first comment on the .s test and forgot about the comment 😇.

Oct 2 2019, 8:19 AM · Restricted Project, Restricted Project

Oct 1 2019

aadsm updated the diff for D68069: Explicitly set entry point arch when it's thumb.

Update tests and fix logic to correctly add the symtab entry.

Oct 1 2019, 1:10 PM · Restricted Project, Restricted Project

Sep 30 2019

aadsm updated the diff for D68069: Explicitly set entry point arch when it's thumb.

Add lit test to check dissassembly

Sep 30 2019, 1:43 PM · Restricted Project, Restricted Project

Sep 27 2019

aadsm added a comment to D68069: Explicitly set entry point arch when it's thumb.
(substituting llvm-mc for as and ld.lld for linker).
Sep 27 2019, 4:42 PM · Restricted Project, Restricted Project
aadsm added a comment to D68069: Explicitly set entry point arch when it's thumb.
Not everyone has both of these things enabled (particularly having lld is less common), but they are things that one _can_ enable no matter what is his host or target architecture, so I am not worried by that. And as tests like these become more common, I expect more people will start having these enabled by default.
Sep 27 2019, 10:48 AM · Restricted Project, Restricted Project

Sep 26 2019

aadsm updated the diff for D68069: Explicitly set entry point arch when it's thumb.

Use GetNextSyntheticSymbolName() to generate the symbol name

Sep 26 2019, 5:52 PM · Restricted Project, Restricted Project
aadsm added a comment to D68069: Explicitly set entry point arch when it's thumb.

For the test, what would you say to writing that as a lit test instead (testing the address class deduction via the disassemble command you mentioned)?

Sep 26 2019, 5:50 PM · Restricted Project, Restricted Project

Sep 25 2019

aadsm created D68069: Explicitly set entry point arch when it's thumb.
Sep 25 2019, 7:11 PM · Restricted Project, Restricted Project

Aug 8 2019

aadsm added a comment to D65949: unittests: Use yaml2obj as a library instead of an external process.

I can see the appeal of having the contents next to the logic that is testing it, but I'm somewhat concerned for the cases where it includes +1000 lines of YAML in the test file. I think for those cases it might make sense to consider these fixtures and be in their own file?

Aug 8 2019, 7:05 PM · Restricted Project

Jul 29 2019

aadsm committed rGfce596160abf: Test load unloading of modules with libraries-svr4 (authored by aadsm).
Test load unloading of modules with libraries-svr4
Jul 29 2019, 11:16 AM
aadsm committed rL367247: Test load unloading of modules with libraries-svr4.
Test load unloading of modules with libraries-svr4
Jul 29 2019, 11:14 AM
aadsm closed D65129: Test load unloading of modules with libraries-svr4.
Jul 29 2019, 11:14 AM · Restricted Project, Restricted Project

Jul 25 2019

aadsm committed rG9294c87282c6: [LLDB] Find debugserver in Command Line Tools as well (authored by aadsm).
[LLDB] Find debugserver in Command Line Tools as well
Jul 25 2019, 1:54 PM
aadsm committed rL367052: [LLDB] Find debugserver in Command Line Tools as well.
[LLDB] Find debugserver in Command Line Tools as well
Jul 25 2019, 1:54 PM
aadsm closed D65171: [LLDB] Find debugserver in Command Line Tools as well.
Jul 25 2019, 1:54 PM · Restricted Project, Restricted Project
aadsm added a comment to D65171: [LLDB] Find debugserver in Command Line Tools as well.

@clayborg, yes, I made sure of that, we always first check the Xcode path.

Jul 25 2019, 1:50 PM · Restricted Project, Restricted Project
aadsm committed rGd668260f1a8e: Correctly use GetLoadedModuleList to take advantage of libraries-svr4 (authored by aadsm).
Correctly use GetLoadedModuleList to take advantage of libraries-svr4
Jul 25 2019, 7:29 AM
aadsm committed rL367020: Correctly use GetLoadedModuleList to take advantage of libraries-svr4.
Correctly use GetLoadedModuleList to take advantage of libraries-svr4
Jul 25 2019, 7:28 AM
aadsm closed D64013: Correctly use GetLoadedModuleList to take advantage of libraries-svr4.
Jul 25 2019, 7:27 AM · Restricted Project, Restricted Project

Jul 24 2019

aadsm updated the diff for D64013: Correctly use GetLoadedModuleList to take advantage of libraries-svr4.

Rebase

Jul 24 2019, 7:37 PM · Restricted Project, Restricted Project

Jul 23 2019

aadsm created D65171: [LLDB] Find debugserver in Command Line Tools as well.
Jul 23 2019, 4:08 PM · Restricted Project, Restricted Project
aadsm committed rG70795c1e3a7f: Revert "Revert "Add ReadCStringFromMemory for faster string reads"" (authored by aadsm).
Revert "Revert "Add ReadCStringFromMemory for faster string reads""
Jul 23 2019, 1:42 PM
aadsm added a reverting change for rG9c10b620c061: Revert "Add ReadCStringFromMemory for faster string reads": rG70795c1e3a7f: Revert "Revert "Add ReadCStringFromMemory for faster string reads"".
Jul 23 2019, 1:41 PM
aadsm added a comment to D62503: Add ReadCStringFromMemory for faster string reads.

I've just done these 2 steps:

Jul 23 2019, 1:41 PM · Restricted Project, Restricted Project
aadsm committed rG05e32bad137c: Revert "Revert "Implement xfer:libraries-svr4:read packet"" (authored by aadsm).
Revert "Revert "Implement xfer:libraries-svr4:read packet""
Jul 23 2019, 1:41 PM
aadsm added a reverting change for rG08c38f77c5fb: Revert "Implement xfer:libraries-svr4:read packet": rG05e32bad137c: Revert "Revert "Implement xfer:libraries-svr4:read packet"".
Jul 23 2019, 1:41 PM
aadsm committed rL366848: Revert "Revert "Add ReadCStringFromMemory for faster string reads"".
Revert "Revert "Add ReadCStringFromMemory for faster string reads""
Jul 23 2019, 1:41 PM
aadsm committed rL366847: Revert "Revert "Implement xfer:libraries-svr4:read packet"".
Revert "Revert "Implement xfer:libraries-svr4:read packet""
Jul 23 2019, 1:40 PM
aadsm added a comment to D65123: Restore tests for lldb-server and lldb-vscode removed at rL366590.

@Hui what do you mean? the history is still there:

Jul 23 2019, 1:31 PM · Restricted Project, Restricted Project
aadsm added a comment to D65123: Restore tests for lldb-server and lldb-vscode removed at rL366590.

@jankratochvil interesting, we're also not able to run the lldb-vscode tests and it was on my todo list to take a look. Although I didn't realize it was a common think I thought it was specific to the environment where I was trying to run them. /cc @xiaobai. Thanks for looking into this!

Jul 23 2019, 10:40 AM · Restricted Project, Restricted Project

Jul 22 2019

aadsm created D65129: Test load unloading of modules with libraries-svr4.
Jul 22 2019, 7:59 PM · Restricted Project, Restricted Project
aadsm updated the diff for D64013: Correctly use GetLoadedModuleList to take advantage of libraries-svr4.

Handle error returned by GetLoadedModuleList

Jul 22 2019, 7:55 PM · Restricted Project, Restricted Project
aadsm committed rGa61c247ce189: Restore tests for lldb-server and lldb-vscode removed at rL366590 (authored by aadsm).
Restore tests for lldb-server and lldb-vscode removed at rL366590
Jul 22 2019, 4:37 PM
aadsm committed rL366766: Restore tests for lldb-server and lldb-vscode removed at rL366590.
Restore tests for lldb-server and lldb-vscode removed at rL366590
Jul 22 2019, 4:35 PM
aadsm closed D65123: Restore tests for lldb-server and lldb-vscode removed at rL366590.
Jul 22 2019, 4:35 PM · Restricted Project, Restricted Project
aadsm created D65123: Restore tests for lldb-server and lldb-vscode removed at rL366590.
Jul 22 2019, 3:54 PM · Restricted Project, Restricted Project
aadsm added a comment to D64992: [lldb][NFC] Cleanup mentions and code related to lldb-mi.

@teemperor This diff deleted all lldb-server and lldb-vscode tests :(

Jul 22 2019, 3:46 PM · Restricted Project