public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug exp/10940] New: Cannot cast to function pointer pointer, (void(**)(void))
@ 2009-11-11 10:03 jed at 59a2 dot org
  2009-11-11 10:28 ` [Bug exp/10940] " schwab at linux-m68k dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: jed at 59a2 dot org @ 2009-11-11 10:03 UTC (permalink / raw)
  To: gdb-prs

To inspect an array of function pointers, I would expect to be able to do

(gdb) p *(void(**)(void))$ops@8

but this gives

A syntax error in expression, near `*)(void))$ops@4'

This can be worked around using the more obtuse cast

p (void(*)(void))*(void**)$ops@8

The need for such shenanigans is more with C++ since x/8a $ops does not pretty-
print the addresses, but the cast should work.

Arch Linux x86_64, kernel 2.6.31, gcc-4.4.2, gdb 7.0

-- 
           Summary: Cannot cast to function pointer pointer,
                    (void(**)(void))
           Product: gdb
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: exp
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: jed at 59a2 dot org
                CC: gdb-prs at sourceware dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=10940

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug exp/10940] Cannot cast to function pointer pointer, (void(**)(void))
  2009-11-11 10:03 [Bug exp/10940] New: Cannot cast to function pointer pointer, (void(**)(void)) jed at 59a2 dot org
@ 2009-11-11 10:28 ` schwab at linux-m68k dot org
  2009-11-11 11:06 ` jed at 59a2 dot org
  2010-01-24  2:17 ` tromey at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: schwab at linux-m68k dot org @ 2009-11-11 10:28 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From schwab at linux-m68k dot org  2009-11-11 10:28 -------
An easier workaround is {void (*)(void)}$ops@8 (or just {void (*)()}$ops@8
since the argument list is ignored anyway).

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10940

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug exp/10940] Cannot cast to function pointer pointer, (void(**)(void))
  2009-11-11 10:03 [Bug exp/10940] New: Cannot cast to function pointer pointer, (void(**)(void)) jed at 59a2 dot org
  2009-11-11 10:28 ` [Bug exp/10940] " schwab at linux-m68k dot org
@ 2009-11-11 11:06 ` jed at 59a2 dot org
  2010-01-24  2:17 ` tromey at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: jed at 59a2 dot org @ 2009-11-11 11:06 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From jed at 59a2 dot org  2009-11-11 11:06 -------
Excellent, I was not aware of {type}.  It makes this issue almost irrelevant.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10940

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug exp/10940] Cannot cast to function pointer pointer, (void(**)(void))
  2009-11-11 10:03 [Bug exp/10940] New: Cannot cast to function pointer pointer, (void(**)(void)) jed at 59a2 dot org
  2009-11-11 10:28 ` [Bug exp/10940] " schwab at linux-m68k dot org
  2009-11-11 11:06 ` jed at 59a2 dot org
@ 2010-01-24  2:17 ` tromey at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: tromey at redhat dot com @ 2010-01-24  2:17 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From tromey at redhat dot com  2010-01-24 02:17 -------


*** This bug has been marked as a duplicate of 9514 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://sourceware.org/bugzilla/show_bug.cgi?id=10940

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

end of thread, other threads:[~2010-01-24  2:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-11 10:03 [Bug exp/10940] New: Cannot cast to function pointer pointer, (void(**)(void)) jed at 59a2 dot org
2009-11-11 10:28 ` [Bug exp/10940] " schwab at linux-m68k dot org
2009-11-11 11:06 ` jed at 59a2 dot org
2010-01-24  2:17 ` tromey 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).