public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/13294] New: printing bit field causes infinite loop
@ 2011-10-13 22:35 dvitek at grammatech dot com
  2011-10-13 22:53 ` [Bug gdb/13294] " dvitek at grammatech dot com
  2011-10-14 10:15 ` pedro at codesourcery dot com
  0 siblings, 2 replies; 3+ messages in thread
From: dvitek at grammatech dot com @ 2011-10-13 22:35 UTC (permalink / raw)
  To: gdb-prs

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

             Bug #: 13294
           Summary: printing bit field causes infinite loop
           Product: gdb
           Version: 7.0
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
        AssignedTo: unassigned@sourceware.org
        ReportedBy: dvitek@grammatech.com
    Classification: Unclassified


I think this is a duplicate of bug 9261, but that one is with an extremely old
version of gdb and is reported in the ada component.  I have below a minimal C
test case that reproduces the problem.

This is on an x86_64 ubuntu system using gcc version 4.4.1 (Ubuntu
4.4.1-4ubuntu9).

gdb --version says: GNU gdb (GDB) 7.0-ubuntu

/* Build me with gcc -g -o foo foo.c */

/* bug doesn't repro without the typedef (weird?) */
typedef unsigned char ui8;

typedef struct _S _S, *S;
struct _S{
    ui8 a : 1;
    ui8 b : 1;
    ui8 c : 1;
    ui8 d : 1;
};

int main()
{
    _S s;
    S p = &s;
    /* break on or single step to the return statement.
     * Type "p p->d" in GDB.
     * GDB will go into an infinite loop.
     * When I attach gdb to gdb, it seems to be getting SIGFPE.
     * Maybe a division by zero? 
     */
    return 0;
}

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug gdb/13294] printing bit field causes infinite loop
  2011-10-13 22:35 [Bug gdb/13294] New: printing bit field causes infinite loop dvitek at grammatech dot com
@ 2011-10-13 22:53 ` dvitek at grammatech dot com
  2011-10-14 10:15 ` pedro at codesourcery dot com
  1 sibling, 0 replies; 3+ messages in thread
From: dvitek at grammatech dot com @ 2011-10-13 22:53 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from Dave Vitek <dvitek at grammatech dot com> 2011-10-13 22:53:05 UTC ---
The behavior does not reproduce when I compile gdb 7.3.1 myself.  So maybe it's
been fixed or the binaries from apt-get have issues.  Or something else I
haven't thought of yet.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug gdb/13294] printing bit field causes infinite loop
  2011-10-13 22:35 [Bug gdb/13294] New: printing bit field causes infinite loop dvitek at grammatech dot com
  2011-10-13 22:53 ` [Bug gdb/13294] " dvitek at grammatech dot com
@ 2011-10-14 10:15 ` pedro at codesourcery dot com
  1 sibling, 0 replies; 3+ messages in thread
From: pedro at codesourcery dot com @ 2011-10-14 10:15 UTC (permalink / raw)
  To: gdb-prs

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

Pedro Alves <pedro at codesourcery dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |pedro at codesourcery dot
                   |                            |com
         Resolution|                            |FIXED

--- Comment #2 from Pedro Alves <pedro at codesourcery dot com> 2011-10-14 10:15:13 UTC ---
I can't remember which commit fixed it, I believe it's been fixed.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

end of thread, other threads:[~2011-10-14 10:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-13 22:35 [Bug gdb/13294] New: printing bit field causes infinite loop dvitek at grammatech dot com
2011-10-13 22:53 ` [Bug gdb/13294] " dvitek at grammatech dot com
2011-10-14 10:15 ` pedro at codesourcery 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).