Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: simon.marchi@polymtl.ca, tromey@adacore.com,
	brobecker@adacore.com, gdb-patches@sourceware.org
Subject: Re: Building today's snapshot of GDB with MinGW
Date: Thu, 2 Jul 2020 19:21:17 +0100	[thread overview]
Message-ID: <5efa2c99-9960-43e1-49d2-317448d69824@palves.net> (raw)
In-Reply-To: <83pn9dx121.fsf@gnu.org>

On 7/2/20 6:46 PM, Eli Zaretskii wrote:
>> Cc: tromey@adacore.com, brobecker@adacore.com, gdb-patches@sourceware.org
>> From: Pedro Alves <pedro@palves.net>
>> Date: Thu, 2 Jul 2020 15:40:20 +0100
>>
>>> 290 i[34567]86-*-linux*)
>>> 291         # Target: Intel 386 running GNU/Linux
>>> 292         gdb_target_obs="i386-linux-tdep.o \
>>> 293                         glibc-tdep.o \
>>> 294                         solib-svr4.o symfile-mem.o \
>>> 295                         linux-tdep.o linux-record.o"
>>> 296         if test "x$enable_64_bit_bfd" = "xyes"; then
>>> 297             # Target: GNU/Linux x86-64
>>> 298             gdb_target_obs="amd64-linux-tdep.o ${gdb_target_obs}"
>>> 299         fi
>>> 300         ;;
>>>
>>
>> This is so a i686-linux-gnu hosted toolchain works with 64-bit binaries.
>> There are vendors who prefer (or used to prefer, time has passed
>> and don't know if that's still a thing) it that way, as it's a single
>> build for 32-bit and 64-bit hosts that way.   Users can then build
>> 64-bit apps with e.g., "i686-unknown-linux-gnu-gcc -m64".  Naturally,
>> the debugger follows suit (though that's only useful for cross debugging,
>> since for native debugging 64-bit inferiors, you need a 64-bit debugger).
> 
> Thanks.
> 
> AFAIK, this is impossible on Windows: a 64-bit debugger can debug
> 32-bit programs (and I think GDB recently learned how to do that), but
> a 32-bit debugger cannot debug 64-bit programs.
> 

Which is exactly the same with Linux.  See my parenthetical remark above.

I.e., a 32-bit GNU/Linux gdb cannot debug a native 64-bit program, but
it can debug against a 64-bit GNU/Linux gdbserver.

So if you make a similar change for Windows, you'll make it so that
a 32-bit Windows gdb could debug against a 64-bit Windows gdbserver.
Whether that's really useful, I have no clue.  All depends on how you
intend to ship the binaries.  Maybe vendors have all switched to
64-bit-hosted toolchains nowadays.


  reply	other threads:[~2020-07-02 18:21 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-29 18:27 Eli Zaretskii
2020-06-29 20:36 ` Christian Biesinger
2020-06-30 14:09   ` Eli Zaretskii
2020-06-30 22:24     ` Simon Marchi
2020-07-01 15:09       ` Eli Zaretskii
2020-07-02 13:50         ` Eli Zaretskii
2020-07-02 14:25           ` Simon Marchi
2020-07-02 14:30             ` Simon Marchi
2020-07-02 17:47               ` Eli Zaretskii
2020-07-02 14:40             ` Pedro Alves
2020-07-02 17:46               ` Eli Zaretskii
2020-07-02 18:21                 ` Pedro Alves [this message]
2020-07-02 18:33                   ` Eli Zaretskii
2020-07-02 18:34                     ` Pedro Alves
2020-07-01 15:20       ` Eli Zaretskii
2020-07-01 19:25         ` Christian Biesinger
2020-07-02  2:29           ` Eli Zaretskii
2020-07-02 10:18             ` Hannes Domani
2020-07-02 13:20               ` Eli Zaretskii
2020-07-06 10:39                 ` Hannes Domani
2020-07-06 16:35                   ` Eli Zaretskii
2020-07-01 19:25     ` Joel Brobecker
2020-07-02 13:46       ` Eli Zaretskii
2020-06-30 16:18 ` Eli Zaretskii
2020-06-30 18:21   ` Christian Biesinger
2020-06-30 18:28     ` Eli Zaretskii
2020-07-01 19:29   ` Joel Brobecker
2020-07-02  2:31     ` Eli Zaretskii
2020-07-01 19:30   ` Joel Brobecker
2020-07-02 13:39     ` Eli Zaretskii
2020-07-03 15:25       ` Joel Brobecker
2020-07-27  9:49         ` Tom de Vries
2020-07-27 10:05           ` Tom de Vries
2020-07-27 10:26             ` Tom de Vries
2020-07-27 11:48               ` [committed][gdb/build] Fix typo sys/sockets.h -> sys/socket.h Tom de Vries
2020-07-27 12:51                 ` Joel Brobecker
2020-07-27 14:18               ` Building today's snapshot of GDB with MinGW Eli Zaretskii
2020-07-02 14:12 ` Eli Zaretskii
2020-07-03 15:08   ` Eli Zaretskii

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=5efa2c99-9960-43e1-49d2-317448d69824@palves.net \
    --to=pedro@palves.net \
    --cc=brobecker@adacore.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    --cc=tromey@adacore.com \
    /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