clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

Adding a test case for this is a good idea. In order to get the PC somewhere 
bad, you can probably make a function pointer that points to data, then try to 
branch there. The PC will end up somewhere with no function name and should 
allow us to reproduce this.

Here is a small program that will reproduce this:

  int main() {
    typedef void (*FooCallback)();
    FooCallback foo_callback = (FooCallback)0;
    foo_callback(); // Crash at zero!
    return 0;
  }

This will crash at 0x00000000 as we tried to call a function there. It makes 
the "<unknown>" show up in the VS code GUI



================
Comment at: lldb/tools/lldb-vscode/JSONUtils.cpp:768
+    // hex string.
+    frame_name.clear();
+    llvm::raw_string_ostream os(frame_name);
----------------
yinghuitan wrote:
> I do not think this is needed? 
remove this, the "frame_name" is already empty from the initializer on line 761


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156732/new/

https://reviews.llvm.org/D156732

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to