~ubuntu-branches/debian/sid/ocaml/sid

« back to all changes in this revision

Viewing changes to debugger/main.ml

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu
  • Date: 2011-04-21 21:35:08 UTC
  • mfrom: (1.1.11 upstream) (12.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110421213508-kg34453aqmb0moha
* Fixes related to -output-obj with g++ (in debian/patches):
  - add Declare-primitive-name-table-as-const-char
  - add Avoid-multiple-declarations-in-generated-.c-files-in
  - fix Embed-bytecode-in-C-object-when-using-custom: the closing
    brace for extern "C" { ... } was missing in some cases

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
(*                                                                     *)
12
12
(***********************************************************************)
13
13
 
14
 
(* $Id: main.ml 9310 2009-07-08 14:30:05Z xclerc $ *)
 
14
(* $Id: main.ml 10444 2010-05-20 14:06:29Z doligez $ *)
15
15
 
16
16
open Input_handling
17
17
open Question
161
161
  printf "The Objective Caml debugger, version %s@." Sys.ocaml_version;
162
162
  exit 0;
163
163
;;
 
164
let print_version_num () =
 
165
  printf "%s@." Sys.ocaml_version;
 
166
  exit 0;
 
167
;;
164
168
 
165
169
let speclist = [
166
170
   "-c", Arg.Int set_checkpoints,
175
179
      "<filename>  Set the name of the communication socket";
176
180
   "-version", Arg.Unit print_version,
177
181
      " Print version and exit";
 
182
   "-vnum", Arg.Unit print_version_num,
 
183
      " Print version number and exit";
178
184
   ]
179
185
 
180
186
let main () =
181
187
  try
182
 
    socket_name := 
 
188
    socket_name :=
183
189
      (match Sys.os_type with
184
 
        "Win32" -> 
 
190
        "Win32" ->
185
191
          (Unix.string_of_inet_addr Unix.inet_addr_loopback)^
186
192
          ":"^
187
193
          (string_of_int (10000 + ((Unix.getpid ()) mod 10000)))