summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 03f3b20)
raw | patch | inline | side by side (parent: 03f3b20)
author | Sebastian Harl <sh@tokkee.org> | |
Sun, 7 Oct 2007 21:50:30 +0000 (23:50 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Tue, 9 Oct 2007 16:03:43 +0000 (18:03 +0200) |
This config option will pass control to the Perl debugger after the
interpreter has been initialized. This is exactly the same as invoking perl
with the "-d" command line switch.
Just as with perl's "-d" command line option you can supply an alternative
debugger. Pass the package name as an argument to the "EnableDebugger" option
See perldebug(1) for more details.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
interpreter has been initialized. This is exactly the same as invoking perl
with the "-d" command line switch.
Just as with perl's "-d" command line option you can supply an alternative
debugger. Pass the package name as an argument to the "EnableDebugger" option
See perldebug(1) for more details.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/perl.c | patch | blob | history |
diff --git a/src/perl.c b/src/perl.c
index 0b78defd864f2eb5dadcf7bb6c233ebf16198f58..3b91e5f4abc97fdb6b2fe0ce4a443737014857b2 100644 (file)
--- a/src/perl.c
+++ b/src/perl.c
{
"LoadPlugin",
"BaseName",
+ "EnableDebugger",
"IncludeDir"
};
static int config_keys_num = STATIC_ARRAY_SIZE (config_keys);
strncpy (base_name, value, sizeof (base_name));
base_name[sizeof (base_name) - 1] = '\0';
}
+ else if (0 == strcasecmp (key, "EnableDebugger")) {
+ perl_argv = (char **)realloc (perl_argv,
+ (++perl_argc + 1) * sizeof (char *));
+
+ if (NULL == perl_argv) {
+ log_err ("perl_config: Not enough memory.");
+ exit (3);
+ }
+
+ if ('\0' == value[0]) {
+ perl_argv[perl_argc - 1] = "-d";
+ }
+ else {
+ perl_argv[perl_argc - 1] = (char *)smalloc (strlen (value) + 4);
+ sstrncpy (perl_argv[perl_argc - 1], "-d:", 4);
+ sstrncpy (perl_argv[perl_argc - 1] + 3, value, strlen (value) + 1);
+ }
+
+ perl_argv[perl_argc] = NULL;
+ }
else if (0 == strcasecmp (key, "IncludeDir")) {
perl_argv = (char **)realloc (perl_argv,
(++perl_argc + 1) * sizeof (char *));