mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
parent
a4d4e2e483
commit
c3e31149a5
5 changed files with 15 additions and 23 deletions
|
@ -77,7 +77,7 @@ bool is_debug_enabled(const char * tag) {
|
|||
|
||||
#if !defined(_WINDOWS) && !defined(NO_Z3_DEBUGGER)
|
||||
void invoke_gdb() {
|
||||
char buffer[1024];
|
||||
std::string buffer;
|
||||
int * x = nullptr;
|
||||
for (;;) {
|
||||
std::cerr << "(C)ontinue, (A)bort, (S)top, (T)hrow exception, Invoke (G)DB\n";
|
||||
|
@ -101,9 +101,9 @@ void invoke_gdb() {
|
|||
throw default_exception("assertion violation");
|
||||
case 'G':
|
||||
case 'g':
|
||||
sprintf(buffer, "gdb -nw /proc/%d/exe %d", getpid(), getpid());
|
||||
buffer = "gdb -nw /proc/" + std::to_string(getpid()) + "/exe " + std::to_string(getpid());
|
||||
std::cerr << "invoking GDB...\n";
|
||||
if (system(buffer) == 0) {
|
||||
if (system(buffer.c_str()) == 0) {
|
||||
std::cerr << "continuing the execution...\n";
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue