<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/56665>56665</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Unable to enable logging on the lldb-server host side.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          tzb99
      </td>
    </tr>
</table>

<pre>
    The lldb-server command is:
lldb-server g 0.0.0.0:2345 riscvv --log-channels lldb all

I cross compiled the lldb project using a in-tree build and the source patch is mainly from: https://github.com/luismarques/llvm-project/commit/4a0cccb0cfa8cb5c59c8803077a76751498447ec











1658443389.905858755 ProcessLaunchInfo.cpp:SetUpPtyRedirection                    Generating a pty to use for stdin/out/err
1658443393.688252211 GDBRemoteCommunicationServerLLGS::InitializeDelegate called with NativeProcessProtocol pid 133, current state: invalid
1658443393.697373867 NativeThreadLinux::SetStoppedBySignal called with signal 0x13
1658443393.700402975 NativeThreadLinux.cpp:MaybeLogStateChange                    pid=133, tid=133: changing from state invalid to stopped
1658443393.705924034 GDBRemoteCommunicationServerLLGS.cpp:LaunchProcess           pid = 133: setting up stdout/stderr redirection via $O gdb-remote commands
1658443393.707329988 ProcessGDBRemoteCommunicationServerLLGS::LaunchProcess setting inferior STDIO fd to 3
Launched 'riscvv' as process 133...
lldb-server-local_build
Connection established.
1658443432.083425999 GDBRemoteCommunicationServerLLGS.cpp:SetCurrentThreadID      setting current thread id to 133
1658443432.084943056 GDBRemoteCommunicationServerLLGS.cpp:PrepareStopReplyPacketF preparing packet for pid 133 tid 133
1658443432.086048365 LogThreadStopInfo: m_stop_info in thread: signal 0x13
1658443432.086704016 LogThreadStopInfo: returned stop_info: signal 0x13
1658443432.087290525 GDBRemoteCommunicationServerLLGS.cpp:PrepareStopReplyPacketF pid 133, tid 133, got signal signo = 19, reason = 5, exc_type = 0
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: lldb-server g 0.0.0.0:2345 riscvv --log-channels lldb all
1.      Program arguments: lldb-server g 0.0.0.0:2345 riscvv --log-channels lldb all
#0 0x00000000000fc97e PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
[ 5430.048226] lldb-server[132]: unhandled signal 11 code 0x1 at 0x0000000000000000 in lldb-server[10000+f9d000]
[ 5430.050003] CPU: 0 PID: 132 Comm: lldb-server Not tainted 5.18.0-rc2 #1
[ 5430.050525] Hardware name: riscv-virtio,qemu (DT)
[ 5430.050923] epc : 000000000016e592 ra : 000000000016e588 sp : 00ffffffc5ced4e0
[ 5430.051341]  gp : 0000000001051ed0 tp : 00ffffffb894f7b0 t0 : fffffffffffff9e0
[ 5430.051815]  t1 : 000000000007275c t2 : 0000000000000010 s0 : 00ffffffc5ced868
[ 5430.052229]  s1 : 00000000010a5110 a0 : 0000000000daf1c8 a1 : 00ffffffc5ced475
[ 5430.052682]  a2 : 000000000000004c a3 : 0000000000000001 a4 : 00ffffffc5ced468
[ 5430.053065]  a5 : 00ffffffc5ced450 a6 : 00000000001476aa a7 : 0000000000000000
[ 5430.053688]  s2 : 00000000010d63e8 s3 : 00ffffffc5ced600 s4 : 0000000000000000
[ 5430.054169]  s5 : 00000000010ed420 s6 : 00000000010edf40 s7 : 00ffffffc5ced530
[ 5430.054577]  s8 : 0000000000000000 s9 : 00ffffffc5ced5a8 s10: 00ffffffc5ced6b0
[ 5430.054959]  s11: 00ffffffc5ced688 t3 : 00ffffffb89c70b6 t4 : 0000000000000000
[ 5430.055240]  t5 : 00ffffffc5cec978 t6 : 000000000000002a
[ 5430.055438] status: 0000000200004020 badaddr: 0000000000000000 cause: 000000000000000d
Segmentation fault

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy1V11zmzoQ_TX2y44ZISE-HvyQxv3ITG6bqdPnjBAy5hYDlYTb9NfflcBJbOht5nYuSWOQyp6zu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