summaryrefslogtreecommitdiff
path: root/byterun/backtrace.c
diff options
context:
space:
mode:
authorLuc Maranget <luc.maranget@inria.fr>2010-01-25 14:52:00 +0000
committerLuc Maranget <luc.maranget@inria.fr>2010-01-25 14:52:00 +0000
commite7ada9b93a02d39cd62f6fd7d9f629429ef51273 (patch)
tree0d5771c12e6ab43afb23e5976c1ab35686a66b30 /byterun/backtrace.c
parent924e832b687e914f4173bb52ec39806b1b6192a8 (diff)
downloadocaml-jo311.tar.gz
Preparing relase 3.11.2jo311
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/jo311@9590 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/backtrace.c')
-rw-r--r--byterun/backtrace.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/byterun/backtrace.c b/byterun/backtrace.c
index 2e645ab512..1afce8ae2a 100644
--- a/byterun/backtrace.c
+++ b/byterun/backtrace.c
@@ -39,6 +39,7 @@ CAMLexport int caml_backtrace_active = 0;
CAMLexport int caml_backtrace_pos = 0;
CAMLexport code_t * caml_backtrace_buffer = NULL;
CAMLexport value caml_backtrace_last_exn = Val_unit;
+CAMLexport char * caml_cds_file = NULL;
#define BACKTRACE_BUFFER_SIZE 1024
/* Location of fields in the Instruct.debug_event record */
@@ -135,7 +136,11 @@ static value read_debug_info(void)
uint32 num_events, orig, i;
value evl, l;
- exec_name = caml_exe_name;
+ if (caml_cds_file != NULL) {
+ exec_name = caml_cds_file;
+ } else {
+ exec_name = caml_exe_name;
+ }
fd = caml_attempt_open(&exec_name, &trail, 1);
if (fd < 0) CAMLreturn(Val_false);
caml_read_section_descriptors(fd, &trail);