-
Notifications
You must be signed in to change notification settings - Fork 588
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support RR extension commands in LLDB
- Loading branch information
1 parent
c52e239
commit e4bf38d
Showing
10 changed files
with
193 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* -*- Mode: C++; tab-width: 8; c-basic-offset: 2; indent-tabs-mode: nil; -*- */ | ||
|
||
#include "Command.h" | ||
#include "GdbServer.h" | ||
#include "launch_debugger.h" | ||
#include "main.h" | ||
|
||
using namespace std; | ||
|
||
namespace rr { | ||
|
||
class LldbInitCommand : public Command { | ||
public: | ||
virtual int run(vector<string>& args) override; | ||
|
||
protected: | ||
LldbInitCommand(const char* name, const char* help) : Command(name, help) {} | ||
|
||
static LldbInitCommand singleton; | ||
}; | ||
|
||
LldbInitCommand LldbInitCommand::singleton("lldbinit", " rr lldbinit\n"); | ||
|
||
int LldbInitCommand::run(vector<string>& args) { | ||
while (parse_global_option(args)) { | ||
} | ||
|
||
puts("# This is a Python script. Save it to a file and run it from LLDB using"); | ||
puts("# script exec(open('<filename>').read())"); | ||
puts("# or similar."); | ||
fputs(lldb_init_script().c_str(), stdout); | ||
return 0; | ||
} | ||
|
||
} // namespace rr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.