mirror of
https://github.com/epasveer/seer.git
synced 2026-08-29 08:34:42 +08:00
Checkpoint with dprintf.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
dprintf -source /nas/erniep/Development/seer/tests/hellodprintf/hellodprintf.cpp -line 17,"Iteration %d Factorial %d\n",n,nfact
|
||||
break -source /nas/erniep/Development/seer/tests/hellodprintf/hellodprintf.cpp -line 24
|
||||
dprintf -source hellodprintf_fortran.f -line 11,"Iteration %d Factorial %d\n",n,nfact
|
||||
@@ -1,13 +1,40 @@
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
FILE* logfile = NULL;
|
||||
|
||||
extern "C" {
|
||||
void fortranfunction_ (int* count);
|
||||
int log_msgxxx (const char* format, ...) {
|
||||
int n;
|
||||
va_list args;
|
||||
// init the variable length argument list
|
||||
va_start(args, format);
|
||||
|
||||
n = vfprintf(logfile, format, args);
|
||||
|
||||
// cleanup the variable length argument list
|
||||
va_end(args);
|
||||
|
||||
return n;
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
void fortranfunction_ (int* count);
|
||||
}
|
||||
|
||||
int main (int argc, char** argv) {
|
||||
|
||||
const char* filename = "logfile.txt";
|
||||
logfile = fopen(filename, "w");
|
||||
if (logfile == NULL) {
|
||||
fprintf(stderr, "Failed to open logfile: %s\n", filename);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int count = 10;
|
||||
int nfact = 1;
|
||||
int n;
|
||||
@@ -19,7 +46,9 @@ int main (int argc, char** argv) {
|
||||
std::cout << std::setw(12) << n << std::setw(14) << nfact << std::endl;
|
||||
}
|
||||
|
||||
fortranfunction_(&count);
|
||||
// fortranfunction_(&count);
|
||||
|
||||
fclose(logfile);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
Hello
|
||||
Hello
|
||||
Hello
|
||||
Hello
|
||||
@@ -0,0 +1,4 @@
|
||||
break -source /nas/erniep/Development/seer/tests/hellogdbserver/hellogdbserver.c -line 127
|
||||
break -source /nas/erniep/Development/seer/tests/hellogdbserver/hellogdbserver.c -line 116
|
||||
catch rethrow
|
||||
awatch x
|
||||
@@ -0,0 +1,8 @@
|
||||
watch argc
|
||||
disable $bpnum
|
||||
rwatch argc
|
||||
ignore $bpnum 3
|
||||
awatch argc
|
||||
commands
|
||||
print argc
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
tvariable $trace_timestamp
|
||||
trace /nas/erniep/Development/seer/tests/helloworld/helloworld.cpp:19
|
||||
commands
|
||||
collect i, argc, argv[i]
|
||||
end
|
||||
Reference in New Issue
Block a user