This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problem remote debugging


On Tue, Feb 24, 2009 at 08:59, Brendan Miller <catphive@catphive.net> wrote:
> I'm having a problem with remote debugging where when debugging
> locally I will launch fine, but when remotely debugging my program
> will fail to open a certain text file, then segfault.
>
> Both the host and client are running x86 RHEL4. The gdb version is
> 6.3.0.0-1.153.el4rh.
>
> In the example below, I am trying to remote debug a fairly complicated
> service that has it's own user "a_user".
>
> On the remote machine I start gdbserver with:
>
> sudo -u a_user gdbserver host:4000 my_binary
>
> On the local machine I run:
> gdb my_binary
>
> Then within gdb I type:
>
> target remote my_remote_machine:4000

Are you sure connect to my_remote_machine:4000 is OK?


> run
>
> Then I get the "failed to open file error" followed by a segfault.
>
> On the other hand if I run this on the remote machine:
> sudo -u a_user gdb my_binary
> run
>
> everything is fine.
>
> Is one of my steps for remote debugging wrong? Would permissions be
> different under remote debugging for some reason, and that would
> explain why I can't open that file under remote debugging?
>
> The service I"m trying to debug is heavily multithreaded, if that
> makes a difference.
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]