public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/18090] New: Binary is truncated to zero size when testing gdbserver and gdb in same directory on same pc
@ 2015-03-08 12:28 rjshaw at netspace dot net.au
  2015-03-08 15:55 ` [Bug gdb/18090] " palves at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rjshaw at netspace dot net.au @ 2015-03-08 12:28 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug gdb/18090] Binary is truncated to zero size when testing gdbserver and gdb in same directory on same pc
  2015-03-08 12:28 [Bug gdb/18090] New: Binary is truncated to zero size when testing gdbserver and gdb in same directory on same pc rjshaw at netspace dot net.au
@ 2015-03-08 15:55 ` palves at redhat dot com
  2015-03-08 22:01 ` schwab@linux-m68k.org
  2015-03-12 12:59 ` palves at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: palves at redhat dot com @ 2015-03-08 15:55 UTC (permalink / raw)
  To: gdb-prs

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

Pedro Alves <palves at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |palves at redhat dot com

--- Comment #1 from Pedro Alves <palves at redhat dot com> ---
I wonder how e.g., scp(1) handles this:

 $ echo "hello" > /tmp/foo
 $ cat /tmp/foo
 hello
 $ scp /tmp/foo localhost:/tmp/foo 
 foo                                     100%    6     0.0KB/s   00:00    
 $ cat /tmp/foo
 hello

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug gdb/18090] Binary is truncated to zero size when testing gdbserver and gdb in same directory on same pc
  2015-03-08 12:28 [Bug gdb/18090] New: Binary is truncated to zero size when testing gdbserver and gdb in same directory on same pc rjshaw at netspace dot net.au
  2015-03-08 15:55 ` [Bug gdb/18090] " palves at redhat dot com
@ 2015-03-08 22:01 ` schwab@linux-m68k.org
  2015-03-12 12:59 ` palves at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: schwab@linux-m68k.org @ 2015-03-08 22:01 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #2 from Andreas Schwab <schwab@linux-m68k.org> ---
It doesn't truncate the file first, only at the end.

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug gdb/18090] Binary is truncated to zero size when testing gdbserver and gdb in same directory on same pc
  2015-03-08 12:28 [Bug gdb/18090] New: Binary is truncated to zero size when testing gdbserver and gdb in same directory on same pc rjshaw at netspace dot net.au
  2015-03-08 15:55 ` [Bug gdb/18090] " palves at redhat dot com
  2015-03-08 22:01 ` schwab@linux-m68k.org
@ 2015-03-12 12:59 ` palves at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: palves at redhat dot com @ 2015-03-12 12:59 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #3 from Pedro Alves <palves at redhat dot com> ---
Thanks.  Sounds like we should do that too then.

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-12 12:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-08 12:28 [Bug gdb/18090] New: Binary is truncated to zero size when testing gdbserver and gdb in same directory on same pc rjshaw at netspace dot net.au
2015-03-08 15:55 ` [Bug gdb/18090] " palves at redhat dot com
2015-03-08 22:01 ` schwab@linux-m68k.org
2015-03-12 12:59 ` palves at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).