public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "rjshaw at netspace dot net.au" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/18090] New: Binary is truncated to zero size when testing gdbserver and gdb in same directory on same pc
Date: Sun, 08 Mar 2015 12:28:00 -0000	[thread overview]
Message-ID: <bug-18090-4717@http.sourceware.org/bugzilla/> (raw)

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.


             reply	other threads:[~2015-03-08  7:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-08 12:28 rjshaw at netspace dot net.au [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-18090-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).