Re: [lldb-dev] How can lldb debug a remote bare-metal platform?

2017-09-18 Thread cui bixiong via lldb-dev
Hi Greg: It's worked, thank you!, but I still have a question, in GNU-GDB which provide `load` command to download a ELF file into bare-board, in LLDB support those features? should I dump a binary file and use lldb "target module load" to replace 'load' command? ​Best Regards --cuibixiong​

Re: [lldb-dev] Reading eValueTypeLoadAddress with missing compiler type

2017-09-18 Thread Greg Clayton via lldb-dev
If you have the binary and the function that this is happening in and can share the binary that contains debug info and also share which file and function and variable is causing the issue, I might be able to tell you why this is happening. Greg > On Sep 18, 2017, at 1:23 PM, Greg Clayton wro

Re: [lldb-dev] Reading eValueTypeLoadAddress with missing compiler type

2017-09-18 Thread Greg Clayton via lldb-dev
A DW_TAG_subprogram's usually has a DW_AT_frame_base DWARF expression that describes where the frame is. That evaluates to something and doesn't require any type. I am guessing you now have a variable that is relative to that frame base and that variable's type is not valid. This can be due to m

[lldb-dev] Reading eValueTypeLoadAddress with missing compiler type

2017-09-18 Thread Leonardo Bianconi via lldb-dev
Hi all! I'm facing an issue with a value of lldb_private::Value::eValueTypeLoadAddress type, which cannot be loaded from memory because the compiler type was not filled. That happens obtaining the fame base, which is based on "DW_OP_call_frame_cfa" case (DWARFExpression.cpp:2825). After obtain

Re: [lldb-dev] lldb_private::RegisterContext vs lldb_private::RegisterInfoInterface

2017-09-18 Thread Ted Woodward via lldb-dev
I recently added Hexagon Linux support to lldb-server; I did what Greg suggested below - subclassed NativeRegisterContextLinux, like the other architectures did. I also added the software breakpoint opcode to NativeProcessLinux. After that, it was just a matter of getting the register accessor

Re: [lldb-dev] How can lldb debug a remote bare-metal platform?

2017-09-18 Thread Greg Clayton via lldb-dev
So when launching a GDB server there are two flows: 1 - When you connect you already have a process 2 - You will connect, then launch or attach to a process LLDB tries to see if there is a process by sending the "qfThreadInfo" packet. As you see below, it responds with on character "l" which mea

Re: [lldb-dev] lldb_private::RegisterContext vs lldb_private::RegisterInfoInterface

2017-09-18 Thread Greg Clayton via lldb-dev
When supporting a new architecture, our preferred route is to modify lldb-server (a GDB server binary that supports native debugging) to support your architecture. Why? Because this gets you remote debugging for free. If you go this route, then you will subclass a lldb_private::NativeRegisterCon