[lldb-dev] Enabling logging from the host gdbserver

2016-04-18 Thread Tyro Software via lldb-dev
Using lldb 3.8.0, what enables logging output from the daughter "gdbserver"
process, e.g. with a tree of processes like this:

\_ /bin/bash
  \_ ./lldb-server platform --listen *:1234 --log-file test.log
--log-channels lldb all:gdb-remote all
 \_ ./lldb-server gdbserver 127.0.0.1:0 --native-regs --pipe 7
\_ ./simple_x86

generated by these lldb commands:

(lldb) platform select remote-linux
(lldb) platform connect connect://localhost:1234
(lldb) target create simple_x86
(lldb) process launch -s

what I want to see is the lldb and gdb-remote logging from the "gdbserver"
host but only the "platform" process output is written to the "test.log"
file.

How can I enable logging for the daughter "gdbserver"?
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] Enabling logging from the host gdbserver

2016-04-18 Thread Pavel Labath via lldb-dev
Hi,

you can set environment variables when lunching the "platform"
instance to enable logging in the "gdbserver" instance:
LLDB_DEBUGSERVER_LOG_FILE=/path/to/log/file
LLDB_SERVER_LOG_CHANNELS="lldb all:gdb-remote all"

Also, depending on what you are trying to achieve, it may be easier to
run the gdbserver manually (perhaps in a debugger) and attach to it
from lldb via "process connect"...

cheers,
pl


On 18 April 2016 at 10:56, Tyro Software via lldb-dev
 wrote:
> Using lldb 3.8.0, what enables logging output from the daughter "gdbserver"
> process, e.g. with a tree of processes like this:
>
> \_ /bin/bash
>   \_ ./lldb-server platform --listen *:1234 --log-file test.log
> --log-channels lldb all:gdb-remote all
>  \_ ./lldb-server gdbserver 127.0.0.1:0 --native-regs --pipe 7
> \_ ./simple_x86
>
> generated by these lldb commands:
>
> (lldb) platform select remote-linux
> (lldb) platform connect connect://localhost:1234
> (lldb) target create simple_x86
> (lldb) process launch -s
>
> what I want to see is the lldb and gdb-remote logging from the "gdbserver"
> host but only the "platform" process output is written to the "test.log"
> file.
>
> How can I enable logging for the daughter "gdbserver"?
>
>
>
> ___
> lldb-dev mailing list
> lldb-dev@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] [Bug 27416] New: missing global variables

2016-04-18 Thread via lldb-dev
https://llvm.org/bugs/show_bug.cgi?id=27416

Bug ID: 27416
   Summary: missing global variables
   Product: lldb
   Version: unspecified
  Hardware: PC
OS: All
Status: NEW
  Severity: normal
  Priority: P
 Component: All Bugs
  Assignee: lldb-dev@lists.llvm.org
  Reporter: rib...@google.com
CC: llvm-b...@lists.llvm.org
Classification: Unclassified

If you look up one or more globals using FindGlobalVariables, a later call to
sc.comp_unit->GetVariableList() only contains the previously found globals

$ cat /tmp/test.c
int a = 0;
int b = 1;
int c = 2;

int main() {
  return 0;
}
$ lldb /tmp/test
(lldb) b main
(lldb) r
(lldb) target variable c
(int) c = 2
(lldb) target variable
Global variables for /tmp/test.c in /tmp/test:
(int) c = 2

This should show all 3 globals, just like if you run "target variable" first:
$ lldb /tmp/test
(lldb) b main
(lldb) r
(lldb) target variable
Global variables for /tmp/test.c in /tmp/test:
(int) c = 2
(int) a = 0
(int) b = 1

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev