#!/usr/bin/perl my $p = `ps -efL | grep "Genode.*$ARGV[0]"`; my $line = defined $ARGV[1] ? $ARGV[1] : 0; my @sp = split "\n", $p; $sp[$line] =~ m/[0-9]+\s+[0-9]+\s+([0-9]+)/; print " $line id $1\n"; exec "gdb -p $1 $ARGV[0]"