Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000085OCamlOCaml generalpublic2000-04-24 16:482000-05-08 20:13
Reporteradministrator 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000085: ocamldebug and relative filenames
DescriptionFull_Name: Samuel Hériard
Version: 3.0
OS: Linux
Submission from: rde1-68.adsl1.club-internet.fr (195.36.220.68)


I don't understand why ocamldebug searchs the program to run in PATH
instead of the current directory when the filename is not an absolute path.
shouldn't something like this be better :

--- /home/heriard/src/caml/ocaml/debugger/program_management.ml Wed Nov 17
19:57:27 1999
+++ program_management.ml Mon Apr 24 16:40:39 2000
@@ -118,11 +118,13 @@
 let initialize_loading () =
   if !debug_loading then
     prerr_endline "Loading debugging informations...";
- Symbols.read_symbols
- (try search_in_path !program_name with
- Not_found ->
- prerr_endline "Program not found.";
- raise Toplevel);
+ if Filename.is_implicit !program_name then
+ program_name := (getcwd () ^ "/" ^ !program_name) ;
+ (try access !program_name [ X_OK ] with
+ Unix_error _ ->
+ prerr_endline "Program not found.";
+ raise Toplevel );
+ Symbols.read_symbols !program_name ;
   if !debug_loading then
     prerr_endline "Opening a socket...";
   open_connection !socket_name

SHD

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000351)
administrator (administrator)
2000-05-08 20:13

> I don't understand why ocamldebug searchs the program to run in PATH
> instead of the current directory when the filename is not an absolute path.

Thanks for the bug report. It is fixed in the working version.

-- Damien

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker