[Lldb-commits] [PATCH] D146044: [lldb] Implement CrashReason using UnixSignals

2023-03-14 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a subscriber: mgorny. DavidSpickett added a comment. @emaste , @mgorny maybe you want to glance at the numbers for the BSDs. I got the codes from the FreeBSD/NetBSD sources, and the signal numbers are as before, using the Darwin numbers. Repository: rG LLVM Github Monorep

[Lldb-commits] [PATCH] D146044: [lldb] Implement CrashReason using UnixSignals

2023-03-14 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added inline comments. Comment at: lldb/source/Plugins/Process/Utility/FreeBSDSignals.cpp:38 + AddSignalCode(8, 8 /*FPE_FLTSUB*/, "invalid floating point subscript range"); + AddSignalCode(8, 9 /*FPE_FLTIDO*/, "input denormal operation"); + This o

[Lldb-commits] [PATCH] D146044: [lldb] Implement CrashReason using UnixSignals

2023-03-14 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 505082. DavidSpickett added a comment. Corect FreeBSD SIGFPE integer overflow/divide by zero order. FreeBSD is overflow then divide by zero. NetBSD is divide by zero then overflow. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[Lldb-commits] [PATCH] D146044: [lldb] Implement CrashReason using UnixSignals

2023-03-14 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 505090. DavidSpickett added a comment. Update the descriptions to match the platform's. Add a couple of FreeBSD signals I missed the first time. We're missing a bunch of Linux ones too but since that file already existed, I don't want to make the diff

[Lldb-commits] [PATCH] D146044: [lldb] Implement CrashReason using UnixSignals

2023-03-14 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett marked an inline comment as done. DavidSpickett added inline comments. Comment at: lldb/source/Plugins/Process/Utility/FreeBSDSignals.cpp:20 + // SIGILL + AddSignalCode(4, 1 /*ILL_ILLOPC*/, "illegal instruction"); + AddSignalCode(4, 2 /*ILL_ILLOPN*/, "illegal ins

[Lldb-commits] [PATCH] D146041: Fix weirdly apologetic diagnostic messages

2023-03-14 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. Is there some standard for writing warning messages? For llvm that is, it would be worth looking through the getting started guides to see. I think the majority of warnings are "formal" in that sense so this seems fine. Personally I agree with making the warnings

[Lldb-commits] [PATCH] D146041: Fix weirdly apologetic diagnostic messages

2023-03-14 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. Ah, here it is: https://llvm.org/docs/CodingStandards.html#error-and-warning-messages Seems to back you up. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146041/new/ https://reviews.llvm.org/D146041 ___

[Lldb-commits] [PATCH] D146058: [lldb][gnustep] Add basic test and infrastructure for GNUstep ObjC runtime

2023-03-14 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a reviewer: DavidSpickett. DavidSpickett added a comment. I am not familiar with Objective C, especially beyond Apple platforms. Are you aiming to run all the existing Objective C test cases with this different runtime or will it be mainly new tests? (would be very neat if yo

[Lldb-commits] [PATCH] D146058: [lldb][gnustep] Add basic test and infrastructure for GNUstep ObjC runtime

2023-03-14 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. > I am not in touch with any of the build bot maintainers for Windows/Linux > LLDB. Do you think it's worth asking for mainline test support? They'd > basically need to build and install libobjc2 once. It's a few hundred > kilobytes. Myself and Omair both work on

[Lldb-commits] [PATCH] D146058: [lldb][gnustep] Add basic test and infrastructure for GNUstep ObjC runtime

2023-03-14 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. The Windows x86 bot has in fact been removed: https://github.com/llvm/llvm-zorg/commit/acb6223670a41a7fe5d9846075e6b92bd157d78f Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146058/new/ https://reviews.llvm.org/D1460

[Lldb-commits] [PATCH] D145580: [lldb] Show register fields using bitfield struct types

2023-03-14 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. > Also, I realise that all this XML substitution with strings is very brittle. > I want to replace that with Python's xml.etree but will do that later in > another patch. Having tried this, it gives you nice indentation but it's not that much different to the raw

[Lldb-commits] [PATCH] D146044: [lldb] Implement CrashReason using UnixSignals

2023-03-15 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett marked an inline comment as done. DavidSpickett added inline comments. Comment at: lldb/include/lldb/Target/UnixSignals.h:127 + struct SignalCode { +ConstString m_description; +SignalCodePrintOption m_print_option; labath wrote: > I think w

[Lldb-commits] [PATCH] D146043: [lldb] Refactor CrashReason

2023-03-15 Thread David Spickett via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGaf38530ee29c: [lldb] Refactor CrashReason (authored by DavidSpickett). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146043/new/ https://reviews.llvm.org/D1

[Lldb-commits] [PATCH] D146044: [lldb] Implement CrashReason using UnixSignals

2023-03-15 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 505413. DavidSpickett added a comment. Use ASSERT_EQ, change name of new function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146044/new/ https://reviews.llvm.org/D146044 Files: lldb/include/lldb/Ta

[Lldb-commits] [PATCH] D146124: [lldb] Fix a 32 bit warning in ScriptedProcessInterface

2023-03-15 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett created this revision. Herald added a project: All. DavidSpickett requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. ../llvm-project/lldb/include/lldb/Interpreter/ScriptedProcessInterface.h:61:12: warning: implicit conversion fro

[Lldb-commits] [PATCH] D146124: [lldb] Fix a 32 bit warning in ScriptedProcessInterface

2023-03-15 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a reviewer: mib. DavidSpickett added a comment. Herald added a subscriber: JDevlieghere. This is pretty trivial but asking for review since I have no experience using this (and am not using it on 32 bit, just want to silence the warning). Repository: rG LLVM Github Monorep

[Lldb-commits] [PATCH] D146041: Fix weirdly apologetic diagnostic messages

2023-03-15 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. > Since this is my first commit to such a large repository(and project), can > you please guide me with this @DavidSpickett ! Sure, you'll want to make a commit that only has changes to warnings and errors. You can split up this one to do that, see part "A)" of th

[Lldb-commits] [PATCH] D146058: [lldb][gnustep] Add basic test and infrastructure for GNUstep ObjC runtime

2023-03-15 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. > As a side-note: Could the AArch64 bot > https://lab.llvm.org/buildbot/#/builders/219 pass LLVM_LIT_ARGS="-v" as well > so the log tells us which tests actually ran? That would be great! Done in https://github.com/llvm/llvm-zorg/commit/571f67f111870c25699ca47cef

[Lldb-commits] [PATCH] D146044: [lldb] Implement CrashReason using UnixSignals

2023-03-15 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett marked an inline comment as done. DavidSpickett added inline comments. Comment at: lldb/source/Plugins/Process/Utility/FreeBSDSignals.cpp:14 FreeBSDSignals::FreeBSDSignals() : UnixSignals() { Reset(); } void FreeBSDSignals::Reset() { arichardson

[Lldb-commits] [PATCH] D146058: [lldb][gnustep] Add basic test and infrastructure for GNUstep ObjC runtime

2023-03-15 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. If I run the test on 32 bit Arm I get these run lines: : 'RUN: at line 4'; '/usr/bin/python3.8' /home/david.spickett/llvm-project/lldb/test/Shell/helper/build.py --compiler=any --arch=32 --tools-dir=/home/david.spickett/build-llvm-arm/./bin --libs-dir=/home/d

[Lldb-commits] [PATCH] D146058: [lldb][gnustep] Add basic test and infrastructure for GNUstep ObjC runtime

2023-03-15 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. I tested this on 32 bit Arm Linux and after a few bodges (see comment), the test itself works fine. I see the CI for the library cross compiles for this, so it makes sense. Comment at: lldb/test/Shell/helper/build.py:256 +self.objc_g

[Lldb-commits] [PATCH] D146045: [LLDB] Show sub type of signals when debugging a core file

2023-03-16 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 505758. DavidSpickett added a comment. Update GetSignalDescription function name. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146045/new/ https://reviews.llvm.org/D146045 Files: lldb/include/lldb/Tar

[Lldb-commits] [PATCH] D146222: [lldb] Add compile time checks for signal codes when on the matching platform

2023-03-16 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett created this revision. Herald added subscribers: krytarowski, arichardson, emaste. Herald added a project: All. DavidSpickett requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. This adds a new macro to the UnixSignals subclasses,

[Lldb-commits] [PATCH] D146044: [lldb] Implement CrashReason using UnixSignals

2023-03-16 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett marked 2 inline comments as done. DavidSpickett added inline comments. Comment at: lldb/source/Plugins/Process/Utility/FreeBSDSignals.cpp:14 FreeBSDSignals::FreeBSDSignals() : UnixSignals() { Reset(); } void FreeBSDSignals::Reset() { DavidSpicke

[Lldb-commits] [PATCH] D146044: [lldb] Implement CrashReason using UnixSignals

2023-03-17 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 506022. DavidSpickett added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146044/new/ https://reviews.llvm.org/D146044 Files: lldb/include/lldb/Target/UnixSignals.h lldb/source/Plug

[Lldb-commits] [PATCH] D146045: [LLDB] Show sub type of signals when debugging a core file

2023-03-17 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 506025. DavidSpickett added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146045/new/ https://reviews.llvm.org/D146045 Files: lldb/include/lldb/Target/StopInfo.h lldb/source/Plugins

[Lldb-commits] [PATCH] D146222: [lldb] Add compile time checks for signal codes when on the matching platform

2023-03-17 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 506028. DavidSpickett added a comment. Remove SEGV_BNDERR defines from FreeBSD and NetBSD. I cargo culted these from CrashReason but on checking the latest sources, they are not in either. It has been in Linux since kernel 3.19 which was February 2015.

[Lldb-commits] [PATCH] D146222: [lldb] Add compile time checks for signal codes when on the matching platform

2023-03-17 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett marked 3 inline comments as done. DavidSpickett added inline comments. Comment at: lldb/source/Plugins/Process/Utility/LinuxSignals.cpp:14 + +#ifndef SEGV_BNDERR +#define SEGV_BNDERR 3 arichardson wrote: > I guess these are needed to support older v

[Lldb-commits] [PATCH] D146222: [lldb] Add compile time checks for signal codes when on the matching platform

2023-03-17 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 506029. DavidSpickett marked an inline comment as done. DavidSpickett added a comment. Correct Linux macro definition when not on Linux. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146222/new/ https://r

[Lldb-commits] [PATCH] D146285: [lldb] For native compiles, check signal numbers are correct when adding codes

2023-03-17 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett created this revision. Herald added subscribers: krytarowski, emaste. Herald added a project: All. DavidSpickett requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D

[Lldb-commits] [PATCH] D146286: [lldb][PDB] Rename GetDeclarationForSymbol() -> AddSourceInfoToDecl()

2023-03-17 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a reviewer: DavidSpickett. DavidSpickett added a comment. Agreed, the original name sounds like a const method. Although I can see why it might have been this way because before optional there was no way to have a null return. So it's return a bool and a ref to the result.

[Lldb-commits] [PATCH] D146221: [CodeView] Add source languages ObjC and ObjC++

2023-03-17 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added inline comments. Comment at: llvm/include/llvm/DebugInfo/CodeView/CodeView.h:142 +/// These values correspond to the CV_CFL_LANG enumeration in the Microsoft +/// Debug Interface Access SDK enum SourceLanguage : uint8_t { Could put the same l

[Lldb-commits] [PATCH] D146297: [lldb][gnustep][PDB] Parse ObjC base classes and recognize NSObject type

2023-03-17 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. I don't know anything about Objective C internals, perhaps you can provide some reference that talks about this? Comment at: lldb/test/Shell/Expr/objc-gnustep-print-pdb.m:44 -// RUN: %lldb -b -o "b objc-gnustep-print-pdb.m:67" -o "run" -o "p pt

[Lldb-commits] [PATCH] D146221: [CodeView] Add source languages ObjC and ObjC++

2023-03-17 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added inline comments. Comment at: llvm/include/llvm/DebugInfo/CodeView/CodeView.h:142 +/// These values correspond to the CV_CFL_LANG enumeration in the Microsoft +/// Debug Interface Access SDK enum SourceLanguage : uint8_t { sgraenitz wrote: > D

[Lldb-commits] [PATCH] D146221: [CodeView] Add source languages ObjC and ObjC++

2023-03-17 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added inline comments. Comment at: llvm/test/DebugInfo/COFF/objc.ll:4-6 +; ASM: .short 4412# Record kind: S_COMPILE3 +; ASM-NEXT: .long 17 # Flags and language +; ASM-NEXT: .short 208 # CPUType --

[Lldb-commits] [PATCH] D146221: [CodeView] Add source languages ObjC and ObjC++

2023-03-17 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett accepted this revision. DavidSpickett added a comment. This revision is now accepted and ready to land. LGTM Comment at: llvm/test/DebugInfo/COFF/objc.ll:4-6 +; ASM: .short 4412# Record kind: S_COMPILE3 +; ASM-NEXT: .long 17

[Lldb-commits] [PATCH] D146044: [lldb] Implement CrashReason using UnixSignals

2023-03-20 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added inline comments. Comment at: lldb/include/lldb/Target/UnixSignals.h:127 + struct SignalCode { +ConstString m_description; +SignalCodePrintOption m_print_option; DavidSpickett wrote: > labath wrote: > > I think we should just make stri

[Lldb-commits] [PATCH] D146044: [lldb] Implement CrashReason using UnixSignals

2023-03-20 Thread David Spickett via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0107513fe79d: [lldb] Implement CrashReason using UnixSignals (authored by DavidSpickett). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146044/new/ https://

[Lldb-commits] [PATCH] D145580: [lldb] Show register fields using bitfield struct types

2023-03-20 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. The shakiest aspect here is probably my use of the scratch type system. It works but I'm not 100% that there isn't a better choice. These are the current steps: - Make the type name. I've prepended `__lldb_` as I saw elsewhere. So register `cpsr` would have a typ

[Lldb-commits] [PATCH] D145574: [lldb] Read register fields from target XML

2023-03-20 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. The big assumption here is that the GDB process lasts longer than the higher level debug session does. I am keeping a map of register name to unique pointer in the GDB process, then giving out raw pointers to the higher level commands. The higher level is destroye

[Lldb-commits] [PATCH] D146045: [LLDB] Show sub type of signals when debugging a core file

2023-03-21 Thread David Spickett via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG85bc498826d4: [LLDB] Show sub type of signals when debugging a core file (authored by DavidSpickett). Repository: rG LLVM Github Monorepo CHANGES

[Lldb-commits] [PATCH] D145566: [lldb] Add RegisterFlags class

2023-03-21 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 506882. DavidSpickett added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145566/new/ https://reviews.llvm.org/D145566 Files: lldb/include/lldb/Target/RegisterFlags.

[Lldb-commits] [PATCH] D145568: [lldb] Add dummy field to RegisterInfo for register flags use later

2023-03-21 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added inline comments. Comment at: lldb/source/Plugins/ABI/ARM/ABIMacOSX_arm.cpp:57-68 {"r1", nullptr, 4, 0, eEncodingUint, eFormatHex, {ehframe_r1, dwarf_r1, LLDB_REGNUM_GENERIC_ARG2, LLDB_INVALID_REGNUM, JD

[Lldb-commits] [PATCH] D145574: [lldb] Read register fields from target XML

2023-03-21 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added inline comments. Comment at: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:4053 + // appears once, so we don't have to handle that here. + if (attr_name == "name") { +LLDB_LOGF(log, JDevlieghere wrote: > Do you

[Lldb-commits] [PATCH] D145566: [lldb] Add RegisterFlags class

2023-03-21 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 506902. DavidSpickett added a comment. Use LOG instead of LOGF. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145566/new/ https://reviews.llvm.org/D145566 Files: lldb/include/lldb/Target/RegisterFlags.

[Lldb-commits] [PATCH] D145574: [lldb] Read register fields from target XML

2023-03-21 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 506903. DavidSpickett added a comment. Use LOG instead of LOGF. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145574/new/ https://reviews.llvm.org/D145574 Files: lldb/include/lldb/Target/DynamicRegiste

[Lldb-commits] [PATCH] D146222: [lldb] Add compile time checks for signal codes when on the matching platform

2023-03-21 Thread David Spickett via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc8af0d3cea8c: [lldb] Add compile time checks for signal codes when on the matching platform (authored by DavidSpickett). Changed prior to commit: https://reviews.llvm.org/D146222?vs=506029&id=506915#toc

[Lldb-commits] [PATCH] D145580: [lldb] Show register fields using bitfield struct types

2023-03-21 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. On the subject of not using `TypeSystemClang`, looking around it seems like `TypeSystem` is purely used to look up basic types, never to make new ones. When new types are made the code asks the `TypeSystem` for its `TypeSystemClang` and then uses that to do it. I

[Lldb-commits] [PATCH] D146285: [lldb] For native compiles, check signal numbers are correct when adding codes

2023-03-21 Thread David Spickett via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG392d9eb03af5: [lldb] For native compiles, check signal numbers are correct when adding codes (authored by DavidSpickett). Changed prior to commit: https://reviews.llvm.org/D146285?vs=506036&id=506971#to

[Lldb-commits] [PATCH] D145940: [lldb] Add test for unavailable registers

2023-03-21 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. ping! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145940/new/ https://reviews.llvm.org/D145940 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llv

[Lldb-commits] [PATCH] D146124: [lldb] Fix a 32 bit warning in ScriptedProcessInterface

2023-03-21 Thread David Spickett via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe73dd6254e31: [lldb] Fix a 32 bit warning in ScriptedProcessInterface (authored by DavidSpickett). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146124/new/

[Lldb-commits] [PATCH] D145940: [lldb] Add test for unavailable registers

2023-03-21 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. It's not in that dir because it's testing how the register command handles missing registers, rather than how the gdb client does. It assumes that the gdb client is correctly doing its job. And it seemed like the place one would look if you wondered whether there

[Lldb-commits] [PATCH] D145940: [lldb] Add test for unavailable registers

2023-03-21 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. The non XML way to do this is just reading bogus register names (and is already tested). However that's all or nothing so it doesn't prove that when there is a mix of available and unavailable registers the command works correctly. Repository: rG LLVM Github Mo

[Lldb-commits] [PATCH] D145940: [lldb] Add test for unavailable registers

2023-03-21 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett planned changes to this revision. DavidSpickett added a comment. On second thought I think you can do this without XML, I'll figure that out. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145940/new/ https://reviews.llvm.org/D145940

[Lldb-commits] [PATCH] D145940: [lldb] Add test for unavailable registers

2023-03-21 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 507035. DavidSpickett added a comment. Remove the need for regex, with the tradeoff that you need the X86 backend which is pretty common to have. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145940/new/

[Lldb-commits] [PATCH] D145580: [lldb] Show register fields using bitfield struct types

2023-03-22 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added inline comments. Comment at: lldb/source/Core/DumpRegisterValue.cpp:136-137 + // See if we have made this type before and can reuse it. + CompilerType fields_type = ast->GetTypeForIdentifier( + ConstString(register_type_name.c_str())); + ---

[Lldb-commits] [PATCH] D146553: [lldb][CMake] Enforce not linking against plugin libs in core libs

2023-03-22 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. Is this policy documented anywhere? Perhaps you can update one of the design pages if it isn't already there. Because I am a bit confused about it. Some parts of lldb use plugins and those parts are called by commands through a few other layers. However commands c

[Lldb-commits] [PATCH] D145940: [lldb] Add test for unavailable registers

2023-03-22 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett marked an inline comment as done. DavidSpickett added inline comments. Comment at: lldb/test/API/commands/register/register/TestRegistersUnavailable.py:43-53 +self.expect("register read --all", patterns=[ +"(?sm)^general purpose registers:\n" +

[Lldb-commits] [PATCH] D145940: [lldb] Add test for unavailable registers

2023-03-22 Thread David Spickett via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGeb78886246da: [lldb] Add test for unavailable registers (authored by DavidSpickett). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145940/new/ https://revie

[Lldb-commits] [PATCH] D145580: [lldb] Show register fields using bitfield struct types

2023-03-22 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added inline comments. Comment at: lldb/source/Core/DumpRegisterValue.cpp:136-137 + // See if we have made this type before and can reuse it. + CompilerType fields_type = ast->GetTypeForIdentifier( + ConstString(register_type_name.c_str())); + ---

[Lldb-commits] [PATCH] D145580: [lldb] Show register fields using bitfield struct types

2023-03-22 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added inline comments. Comment at: lldb/source/Commands/CommandObjectRegister.cpp:229 +if (!DumpRegister(m_exe_ctx, strm, reg_ctx, reg_info, + /*print_flags=*/true, type_system)) strm.Printf("%-12s = error: una

[Lldb-commits] [PATCH] D146553: [lldb][CMake] Enforce not linking against plugin libs in core libs

2023-03-23 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. > I suppose it just depends on what you're trying to do, which I realize may > not be the most helpful advice but I hope that with enough examples it > becomes at least a little more clear how things in lldb are currently done... No it makes sense, I think I have

[Lldb-commits] [PATCH] D145580: [lldb] Show register fields using bitfield struct types

2023-03-23 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. > So the better solution may be along the lines of a register formatting plugin > that depends on TypeSystemClang. Based on discussion here and on another patch, I'm going to try Adrian's suggestion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[Lldb-commits] [PATCH] D146058: [lldb][gnustep] Add basic test and infrastructure for GNUstep ObjC runtime

2023-03-24 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. No issues with the patch. If you want to get it enabled on Linaro's lldb bots, email linaro-toolch...@lists.linaro.org and one of us will set it up for you. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146058/new/

[Lldb-commits] [PATCH] D147300: [lldb] Fix build on older FreeBSD

2023-04-03 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett accepted this revision. DavidSpickett added a comment. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147300/new/ https://reviews.llvm.org/D147300 ___ lldb-commits mailing list lldb-

[Lldb-commits] [PATCH] D147045: [lldb] Drop RegisterInfoInterface::GetDynamicRegisterInfo

2023-04-03 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett accepted this revision. DavidSpickett added a comment. This revision is now accepted and ready to land. LGTM I have no idea about the specific use case but less code is good. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147045/new/

[Lldb-commits] [PATCH] D146965: [lldb] Add support for MSP430 in LLDB.

2023-04-03 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. > One concern I have is that there are no tests. I can understand that it may > be difficult to get automated tests running testing the debugging of an > architecture like MSP430 but there are things we can test to sanity test > MSP430 support Two things come to

[Lldb-commits] [PATCH] D146965: [lldb] Add support for MSP430 in LLDB.

2023-04-04 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. > It is completely bare metal, but the address space is only 16-bit, so would > the entire 64 KB of memory count as a core dump? It's more "world" than "core" but yeah why not. Probably won't need all 64k though, see below... > I can make a test that checks if fa

[Lldb-commits] [PATCH] D147606: [lldb] fix #61942, discard "empty" ranges in DWARF to better handle gcc binary

2023-04-05 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. I'm not familiar with this code, but the issue as explained I think I understand. It seems like you're checking for empty ranges in two places, what does each one do? Is there anything else these ranges indicate or do we think it is simply a missed optimisation

[Lldb-commits] [PATCH] D145580: [lldb] Show register fields using bitfield struct types

2023-04-05 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 511096. DavidSpickett added a comment. This revision is now accepted and ready to land. Move the type generation into a new plugin type, RegisterTypeBuilder. This means we're still resuing types if you read the same register multiple times, but we are r

[Lldb-commits] [PATCH] D145580: [lldb] Show register fields using bitfield struct types

2023-04-05 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett marked 9 inline comments as done. DavidSpickett added a comment. @bulbazord Please take a look and see if I've done the plugin/core code split correctly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145580/new/ https://reviews.llvm.

[Lldb-commits] [PATCH] D147627: [lldb][ObjectFileELF] Improve error output for unsupported arch/relocations

2023-04-06 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. Agreed. The tangled web of switch statements makes my head spin so if you ever feel like tackling that please do :) Comment at: lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:2704 +default: + assert(false && "unexpected re

[Lldb-commits] [PATCH] D146965: [lldb] Add support for MSP430 in LLDB.

2023-04-11 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. > Looked into core dumping in LLDB a bit, I think it pretty much requires that > there is an OS, and there needs to be an explicit support for the > architecture in question. Plus, mspdebug doesn't actually support core files, > there is no use for it now even if

[Lldb-commits] [PATCH] D147820: debugserver: move AArch64 watchpoint traps within a watchpointed region, parse ESR flags and send them to lldb

2023-04-11 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. > This patch takes the trap address (FAR register) and finds the nearest > watchpoint if it is not contained in any watched region. From what I remember, the Linux kernel also does this. Comment at: lldb/test/API/commands/watchpoints/unaligned-

[Lldb-commits] [PATCH] D147816: Clarify how watchpoint description in stop packets work, fix AArch64 unintended behavior

2023-04-11 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. Thanks for looking into all this, it makes my head hurt thinking about it :) It will likely take us (Linaro) a while to do the lldb-server changes, but I do want to see this fixed eventually. We have some work upcoming for memcopy operations that will need special

[Lldb-commits] [PATCH] D147816: Clarify how watchpoint description in stop packets work, fix AArch64 unintended behavior

2023-04-12 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. Looks good to me, @omjavaid ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147816/new/ https://reviews.llvm.org/D147816 ___ lldb-commits mailing list lldb-commits@lists.ll

[Lldb-commits] [PATCH] D147820: debugserver: move AArch64 watchpoint traps within a watchpointed region, parse ESR flags and send them to lldb

2023-04-12 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added inline comments. Comment at: lldb/test/API/commands/watchpoints/unaligned-watchpoint/main.c:8-11 + printf("%lld %lld\n", (*u64_p)++, (*u64_p)++); + printf("%lld %lld\n", (*u64_p)++, (*u64_p)++); + printf("%lld %lld\n", (*u64_p)++, (*u64_p)++); + printf

[Lldb-commits] [PATCH] D145566: [lldb] Add RegisterFlags class

2023-04-12 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 512692. DavidSpickett added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145566/new/ https://reviews.llvm.org/D145566 Files: lldb/include/lldb/Target/RegisterFlags.h lldb/source/Ta

[Lldb-commits] [PATCH] D145574: [lldb] Read register fields from target XML

2023-04-12 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 512702. DavidSpickett added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145574/new/ https://reviews.llvm.org/D145574 Files: lldb/include/lldb/Target/DynamicRegisterInfo.h lldb/inc

[Lldb-commits] [PATCH] D145580: [lldb] Show register fields using bitfield struct types

2023-04-12 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 512710. DavidSpickett added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145580/new/ https://reviews.llvm.org/D145580 Files: lldb/include/lldb/Core/DumpRegisterValue.h lldb/include

[Lldb-commits] [PATCH] D148099: [lldb] Reduce chances of spurious failures in some build setups

2023-04-12 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. Could you look for the full output line instead? (lldb) expression 1+1 (int) $0 = 2 Even if `$0` changes maybe `= ` can be checked. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148099/new/ https://reviews.llvm.

[Lldb-commits] [PATCH] D148099: [lldb] Reduce chances of spurious failures in some build setups

2023-04-12 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a reviewer: DavidSpickett. DavidSpickett accepted this revision. DavidSpickett added a comment. This revision is now accepted and ready to land. Looks good to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148099/new/ https:/

[Lldb-commits] [PATCH] D146965: [lldb] Add support for MSP430 in LLDB.

2023-04-13 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. Thanks for the test changes, looks good. There is some documentation that lists what targets we support, MSP430 should be added there. `lldb/docs/index.rst` is one of those. Otherwise, can anyone else think of major debug features that should be (at least) smoke

[Lldb-commits] [PATCH] D146965: [lldb] Add support for MSP430 in LLDB.

2023-04-13 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. Also please update the commit message to make it clear that this is for using lldb with mspdebug, not with lldb-server. To help us and also to help anyone who might link to this commit to share the good news :) CHANGES SINCE LAST ACTION https://reviews.llvm.or

[Lldb-commits] [PATCH] D145566: [lldb] Add RegisterFlags class

2023-04-13 Thread David Spickett via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6ea45e3007b8: [lldb] Add RegisterFlags class (authored by DavidSpickett). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145566/new/ https://reviews.llvm.org

[Lldb-commits] [PATCH] D146965: [lldb] Add support for MSP430 in LLDB.

2023-04-13 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. I just landed https://github.com/llvm/llvm-project/commit/57c8fee1b97eb7e70513b935b765f8381a941b18 which will give you build errors. All you have to do is add an extra `nullptr` to your register infos. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146965

[Lldb-commits] [PATCH] D145574: [lldb] Read register fields from target XML

2023-04-13 Thread David Spickett via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG54981bb75d37: [lldb] Read register fields from target XML (authored by DavidSpickett). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145574/new/ https://rev

[Lldb-commits] [PATCH] D145580: [lldb] Show register fields using bitfield struct types

2023-04-13 Thread David Spickett via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe07a421dd587: [lldb] Show register fields using bitfield struct types (authored by DavidSpickett). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145580/new/

[Lldb-commits] [PATCH] D148228: [lldb] Change some pointers to refs in register printing code

2023-04-13 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett created this revision. Herald added a project: All. DavidSpickett requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. No one was passing nullptr for these. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D148228

[Lldb-commits] [PATCH] D145574: [lldb] Read register fields from target XML

2023-04-14 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett marked an inline comment as done. DavidSpickett added inline comments. Comment at: lldb/include/lldb/lldb-private-types.h:14 +#include "lldb/Target/RegisterFlags.h" #include "lldb/lldb-private.h" MaskRay wrote: > Is there a library layering viola

[Lldb-commits] [PATCH] D148228: [lldb] Change some pointers to refs in register printing code

2023-04-17 Thread David Spickett via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2ad771cf7bae: [lldb] Change some pointers to refs in register printing code (authored by DavidSpickett). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148228

[Lldb-commits] [PATCH] D146965: [lldb] Add support for MSP430 in LLDB.

2023-04-17 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett accepted this revision. DavidSpickett added a comment. This revision is now accepted and ready to land. I'm sure there's something missing but LGTM. @bulbazord ? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146965/new/ https://reviews.llvm.org/D146965 __

[Lldb-commits] [PATCH] D148062: [lldb] Make ObjectFileJSON loadable as a module

2023-04-17 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added subscribers: omjavaid, DavidSpickett. DavidSpickett added a comment. FYI this test is failing on our Windows on Arm bot due to not finding `strip`: https://lab.llvm.org/buildbot/#/builders/219/builds/2164/steps/6/logs/stdio I see other uses so not sure why this one isn't work

[Lldb-commits] [PATCH] D148541: [lldb] fix build issue on MSVC because of missing byte-swap builtins

2023-04-18 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. Thanks for the fix! Made me realise I should have looked harder for an llvm utility in the first place, and it turns out `llvm::byteswap` exists. So I've changed this to use that in https://github.com/llvm/llvm-project/commit/9984cfc86ed6d5c1558d8dd82d82448e50d70

[Lldb-commits] [PATCH] D148541: [lldb] fix build issue on MSVC because of missing byte-swap builtins

2023-04-18 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. By the way, did this come up on a bot? Just wondering if I ignored an email, apologies if so. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148541/new/ https://reviews.llvm.org/D148541 __

[Lldb-commits] [PATCH] D148546: Reland: [Demangle] replace use of llvm::StringView w/ std::string_view

2023-04-18 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. I am confused why startswith is in the itanium demangle namespace but I could be confusing a specialised function with the generic one that works for any string view. Otherwise looks fine at a glance. Comment at: llvm/include/llvm/Demangle/Itani

[Lldb-commits] [PATCH] D148546: Reland: [Demangle] replace use of llvm::StringView w/ std::string_view

2023-04-19 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett accepted this revision. DavidSpickett added a comment. This revision is now accepted and ready to land. I don't know enough to review the other patches but I understand the layering issue. So assuming the other patches are ok, this one LGTM. Comment at: llvm/incl

[Lldb-commits] [PATCH] D143374: [LLDB][RISCV] Add RVV register infos

2023-04-19 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. In the time since this was written and landed, I added an extra field to register information. Fixed that here: https://github.com/llvm/llvm-project/commit/ee9a646192db1cc5d1df57d69232fdd2a5c89fc5 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[Lldb-commits] [PATCH] D148715: [LLDB] Discard register flags where the size doesn't match the register

2023-04-19 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett created this revision. Herald added a project: All. DavidSpickett requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. In the particular case I was looking at I autogenerated a 128 bit set of flags that is only 64 bit. This doesn't

[Lldb-commits] [PATCH] D148715: [LLDB] Discard register flags where the size doesn't match the register

2023-04-20 Thread David Spickett via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdbc34e2bed10: [LLDB] Discard register flags where the size doesn't match the register (authored by DavidSpickett). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

<    3   4   5   6   7   8   9   10   11   12   >