[petsc-users] Attaching to gdb within screen

John Fettig john.fettig at gmail.com
Wed Jun 22 09:05:59 CDT 2011


On Wed, Jun 22, 2011 at 9:57 AM, Jed Brown <jed at 59a2.org> wrote:
> On Wed, Jun 22, 2011 at 15:50, John Fettig <john.fettig at gmail.com> wrote:
>>
>> This still doesn't work, although I have no idea why.  The title of
>> the screen changes briefly to
>>
>> Cannot exec '/correct/path/garbage': No such file or directory.
>>
>> where "garbage" means non-ascii characters.  I gave it the full path
>> to redirect.sh and it displayed that correctly, just not the script.
>
> By title, I'm guessing you mean the screen session title.

Yes, that's what I meant.  The title bar in the terminal window
briefly changes to that, and then it returns to "screen 0: bash".

> Could you try changing the script to just have:
> echo ppid=$PPID pwd=$PWD cmd="$@"
> sleep 10

This makes no difference, because the script isn't executing. If it
makes any difference, I'm setting the options through the environment
variable "PETSC_OPTIONS"

John

> Screen's remote session creation unfortunately resets PWD (at least on my
> machine), so the gdb command is expected to "fail" at opening the executable
> (unless the original program was invoked with full path), but succeed at
> attaching to the process ID.


More information about the petsc-users mailing list