0

I am writing perl script which is getting core from Production. I have got core and need to run the gdb on these core file. Can anyone provide me info to connect gdb from perl script.

  • Are you asking how to use `system('gdb filename')`?, or how to manipulate the debugger from within Perl as well? (Try the Expect module, or Expect::Simple, in that case). – DavidO Jul 09 '12 at 07:14
  • ya Meanwhile I found the http://search.cpan.org/~jezra/Devel-GDB-2.02/lib/Devel/GDB.pm package which connect the gdb. But my purpose is to connect gdb than run core corefile and whre command into gdb and save the console output into file. –  Jul 09 '12 at 07:26

1 Answers1

1

Can anyone provide me info to connect gdb from perl script.

You don't want to do that.

What you want to do instead, is figure out why your perl is crashing with a core dump in production. To do that, run

gdb /path/to/perl /path/to/core

on the production machine, then issue where command.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362