This is the mail archive of the gdb-prs@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]

[Bug gdb/18090] New: Binary is truncated to zero size when testing gdbserver and gdb in same directory on same pc


https://sourceware.org/bugzilla/show_bug.cgi?id=18090

            Bug ID: 18090
           Summary: Binary is truncated to zero size when testing
                    gdbserver and gdb in same directory on same pc
           Product: gdb
           Version: 7.9
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: rjshaw at netspace dot net.au

Hi,
I started in /home/russell/myprogdir/

gdbserver main:1234 myprog

then i do in gdb:

(gdb) target extended-remote main:1234
Remote debugging using main:1234
(gdb) cd /home/russell/myprogdir
Working directory /home/russell/myprogdir.
(gdb) file myprog
Reading symbols from myprog...done.
(gdb) remote put myprog myprog
Successfully sent file "myprog".

When testing with gdbserver invoked on the same pc (main) in the same directory
(/home/russell/myprogdir), "myprog" is truncated to 0 bytes by "remote put
myprog myprog".

"remote put" should first copy myprog to /tmp, open the remote myprog for
writing (which truncates it), then copy from /tmp. Another way is to note the
source and dest are the same, and skip the copying.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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