public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/19797] Unsupported powerpc bfd arch/machine variants
       [not found] <bug-19797-4717@http.sourceware.org/bugzilla/>
@ 2021-03-26  4:07 ` luoyonggang at gmail dot com
  2021-03-26 18:54 ` luoyonggang at gmail dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: luoyonggang at gmail dot com @ 2021-03-26  4:07 UTC (permalink / raw)
  To: gdb-prs

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

Yonggang Luo <luoyonggang at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |luoyonggang at gmail dot com

--- Comment #7 from Yonggang Luo <luoyonggang at gmail dot com> ---
Hi I am using GNU gdb (GDB) 10.1, and it's doesn't support for remote debugging

powerpc:e500mc
powerpc:common64
powerpc:e6500

```
PS C:\work\xemu\xemu-with-lib> powerpc-none-eabi-gdb.exe
C:/work/windriver/vxworks-6.9/qsp/default/vxWorks
GNU gdb (GDB) 10.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-w64-mingw32
--target=powerpc-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from C:/work/windriver/vxworks-6.9/qsp/default/vxWorks...
(gdb) set arch powerpc:e500mc
Architecture `powerpc:e500mc' not recognized.
The target architecture is set to "auto" (currently "powerpc:common").
(gdb) set arch powerpc:common64
Architecture `powerpc:common64' not recognized.
The target architecture is set to "auto" (currently "powerpc:common").
(gdb) set arch powerpc:e6500
Architecture `powerpc:e6500' not recognized.
The target architecture is set to "auto" (currently "powerpc:common").
(gdb)
```
Anyway to resolve the issue?

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

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

* [Bug gdb/19797] Unsupported powerpc bfd arch/machine variants
       [not found] <bug-19797-4717@http.sourceware.org/bugzilla/>
  2021-03-26  4:07 ` [Bug gdb/19797] Unsupported powerpc bfd arch/machine variants luoyonggang at gmail dot com
@ 2021-03-26 18:54 ` luoyonggang at gmail dot com
  2023-03-17 13:36 ` [Bug tdep/19797] " tromey at sourceware dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: luoyonggang at gmail dot com @ 2021-03-26 18:54 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #8 from Yonggang Luo <luoyonggang at gmail dot com> ---
Created attachment 13330
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13330&action=edit
Tentative fixes this issue

I've trying to fixes this issue, but raise an new error.
I am trying running 32bit elf binary on 64bit machine.

How to add 32bit binary support in rs6000_gdbarch_init?

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

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

* [Bug tdep/19797] Unsupported powerpc bfd arch/machine variants
       [not found] <bug-19797-4717@http.sourceware.org/bugzilla/>
  2021-03-26  4:07 ` [Bug gdb/19797] Unsupported powerpc bfd arch/machine variants luoyonggang at gmail dot com
  2021-03-26 18:54 ` luoyonggang at gmail dot com
@ 2023-03-17 13:36 ` tromey at sourceware dot org
  2023-03-17 14:24 ` tromey at sourceware dot org
  2023-03-17 14:43 ` tromey at sourceware dot org
  4 siblings, 0 replies; 5+ messages in thread
From: tromey at sourceware dot org @ 2023-03-17 13:36 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|gdb                         |tdep
                 CC|                            |tromey at sourceware dot org

--- Comment #9 from Tom Tromey <tromey at sourceware dot org> ---
I've run into this as well.
In particular _bfd_elf_ppc_set_arch can pick "titan" for a file
I have, but gdb doesn't recognzie this.

Also, moving this to tdep.

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

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

* [Bug tdep/19797] Unsupported powerpc bfd arch/machine variants
       [not found] <bug-19797-4717@http.sourceware.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2023-03-17 13:36 ` [Bug tdep/19797] " tromey at sourceware dot org
@ 2023-03-17 14:24 ` tromey at sourceware dot org
  2023-03-17 14:43 ` tromey at sourceware dot org
  4 siblings, 0 replies; 5+ messages in thread
From: tromey at sourceware dot org @ 2023-03-17 14:24 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #10 from Tom Tromey <tromey at sourceware dot org> ---
For my file, a sufficiently old gdb (7.10) works
(or at least -- it does not complain) but a newer
one fails.

It comes from this patch:

commit 14b57c7c6a53c747a8819fed3da858eae4195a0e
Author: Alan Modra <amodra@gmail.com>
Date:   Tue Jun 7 22:04:38 2016 +0930

    PowerPC VLE


I'm not a PPC expert so I don't know whether gdb should
be trying to handle ever bfd_mach_* value, or if some
fallback is appropriate instead.

I do see that the logic in _bfd_elf_ppc_set_arch is a little
strange in that the order of entries in the apuinfo can
affect the result.  Like in my file, the order is

   description data: 00 43 00 01 00 40 00 01 00 42 00 01 

so it moves through the loop like:

                  if (mach == bfd_mach_ppc_titan)
                    mach = bfd_mach_ppc_e500mc;

                  if (mach == 0)
                    mach = bfd_mach_ppc_titan;

... so it ends up picking 'titan'.  But if the entries
were reordered, it would pick e500mc instead (which gdb
also doesn't handle :-)

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

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

* [Bug tdep/19797] Unsupported powerpc bfd arch/machine variants
       [not found] <bug-19797-4717@http.sourceware.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2023-03-17 14:24 ` tromey at sourceware dot org
@ 2023-03-17 14:43 ` tromey at sourceware dot org
  4 siblings, 0 replies; 5+ messages in thread
From: tromey at sourceware dot org @ 2023-03-17 14:43 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #11 from Tom Tromey <tromey at sourceware dot org> ---
I don't think I'll look into this any more, but I do
wonder if gdb should perhaps fall back to some more generic
PPC if it find a bfd_mach_* value that it doesn't expect.
I don't know whether this is correct or not, but it might
let debugging work "well enough", whereas right now you can
be wholly prevented from doing anything if the remote, say,
reports a .so that gdb doesn't understand.

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

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

end of thread, other threads:[~2023-03-17 14:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-19797-4717@http.sourceware.org/bugzilla/>
2021-03-26  4:07 ` [Bug gdb/19797] Unsupported powerpc bfd arch/machine variants luoyonggang at gmail dot com
2021-03-26 18:54 ` luoyonggang at gmail dot com
2023-03-17 13:36 ` [Bug tdep/19797] " tromey at sourceware dot org
2023-03-17 14:24 ` tromey at sourceware dot org
2023-03-17 14:43 ` tromey at sourceware dot org

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).