Browse files

Let's just call a spade a spade. parrot_debugger does not take any fl…

…ags or commandline options, so test for them and fail if they are found. Also, the PIR compilation pathway does not work and it isn't worth the effort to fix it, so delete it. This fixes #540. The 'real' solution is to delete this file entirely and write a new debugger.
  • Loading branch information...
1 parent b90faed commit 55721f44b05c193cb2b155ce20dbef4443a198f8 @Whiteknight Whiteknight committed May 7, 2012
Showing with 5 additions and 18 deletions.
  1. +5 −18 frontend/parrot_debugger/main.c
View
23 frontend/parrot_debugger/main.c
@@ -205,7 +205,11 @@ main(int argc, const char *argv[])
const char * const filename = argv[nextarg];
const char * const ext = strrchr(filename, '.');
- if (ext && STREQ(ext, ".pbc")) {
+ if (*filename == '-') {
+ fprintf(stderr, "parrot_debugger takes no -x or --xxxx flag arguments");
+ exit(1);
+ }
+ else {
STRING * const filename_str = Parrot_str_new(interp, filename, 0);
PackFile * const pfraw = Parrot_pf_read_pbc_file(interp, filename_str);
Parrot_PackFile pf;
@@ -220,23 +224,6 @@ main(int argc, const char *argv[])
Parrot_pf_set_current_packfile(interp, pf);
Parrot_pf_prepare_packfile_init(interp, pf);
}
- else {
- STRING * const str = Parrot_str_new(interp, filename, 0);
- Parrot_PackFile pf = Parrot_pf_get_packfile_pmc(interp, PackFile_new(interp, 0), str);
- STRING * const compiler_s = Parrot_str_new(interp, "PIR", 0);
- PMC * const compiler = Parrot_interp_get_compiler(interp, compiler_s);
-
- Parrot_pf_set_current_packfile(interp, pf);
-
- Parrot_interp_compile_file(interp, compiler, str);
- /*if (errmsg)
- Parrot_ex_throw_from_c_args(interp, NULL, 1, "Could not compile file");*/
-
- /* load the source for debugger list */
- PDB_load_source(interp, filename);
-
- Parrot_pf_prepare_packfile_init(interp, pf);
- }
}
else {
/* Generate some code to be able to enter into runloop */

0 comments on commit 55721f4

Please sign in to comment.