home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.gdb.bug
- Path: sparky!uunet!cis.ohio-state.edu!gmd.DE!tietz
- From: tietz@gmd.DE (Christoph Tietz)
- Subject: gdb-4.6 crashes on trivial program
- Message-ID: <tietz.712510572@gmd.de>
- Sender: gnulists@ai.mit.edu
- Organization: GMD, Sankt Augustin, Germany
- Distribution: gnu
- Date: Thu, 30 Jul 1992 15:36:12 GMT
- Approved: bug-gdb@prep.ai.mit.edu
- Lines: 68
-
- // This may look like C code, but it is really -*- C++ -*-
- //
- // Compiling with g++-2.2.2, linked with libg++-2.2 on a
- // SUN4 (SPARCstation IPX) running SunOS 4.1.2:
- //
- // g++ -pipe -g -I/vol/gnu/lib/g++2-include -o qwrst qwrst.cc -lg++2
- //
- // Using gdb-4.6:
- //
- // The attempt to "debug" the following program crashes gdb:
- // Set a breakpoint at the first line of function funcA (e.g. break funcA)
- // and let the program run :-(
-
- #include <stream.h>
-
- class Dings {
- public:
- virtual void bums ();
- };
-
- void Dings::bums () {}
-
- typedef void (Dings::*dingsMem)();
-
- void funcA (dingsMem a) {
- cout << "funcA\n";
- }
-
- main () {
- Dings a;
-
- funcA (a.bums);
- }
-
- ------------------------------ snip here --------------------------------------
-
- A session of gdb with gdb looks as follows:
-
- Starting program: /vol/gnu/bin/gdb qwrst
- GDB is free software and you are welcome to distribute copies of it
- under certain conditions; type "show copying" to see the conditions.
- There is absolutely no warranty for GDB; type "show warranty" for details.
- GDB 4.6, Copyright 1992 Free Software Foundation, Inc...
- gdb_qwrst> break funcA
- Breakpoint 1 at 0x22b0: file qwrst.cc, line 22.
- Current Language: auto; currently c++
- Type checking: auto; currently off
- Range checking: auto; currently off
- gdb_qwrst> run
- Starting program: /tmp_mnt/home/tietz/sesame/qwrst
-
-
- Program received signal 11, Segmentation fault
- 0x1cca4 in val_print ()
- gdb_qwrst> where
- #0 0x1cca4 in val_print ()
- #1 0x21798 in print_frame_args ()
- #2 0xdb68 in print_frame_info ()
- #3 0xd9a4 in print_stack_frame ()
- #4 0x30300 in normal_stop ()
- #5 0x2f0f0 in child_create_inferior ()
- #6 0x2b770 in tty_command ()
- #7 0x3940 in execute_command ()
- #8 0x3af4 in execute_command ()
- #9 0x3740 in main ()
-
- Christoph Tietz (tietz@gmd.de or tietz@zi.gmd.dbp.de)
-
-