Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Berlin <dan@cgsoftware.com>
To: David Cogen <cogen@ll.mit.edu>
Cc: kettenis@wins.uva.nl, gdb@sourceware.cygnus.com
Subject: Re: gdb seg violation during print command
Date: Thu, 04 May 2000 10:41:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.10.10005041038260.27878-100000@propylaea.anduin.com> (raw)
In-Reply-To: <200005041655.MAA10513@ll.mit.edu>

> 
> Sorry, that's not it. I have also tried the following:
> 
> #include <iostream>
> 
> int tteesstt11 (int)
> {
>   cerr << "\n";
>   return 4;
> }
> 
> int main ()
> {
> }
> 
> print tteesstt11(1) from a breakpoint in main() still causes gdb to seg
> fault. Indeed, I have tried lots of forms for tteesstt11; they all seg fault.
Okay.
Well, it works perfectly for me once i add the return. Prints the newline,
then 4.

> 
> > In the newer gdb, what'll happen is you'll get no segfault, but a weird number
> > returned, which will actually the address of the function, which is
> > the last value we have around, i guess.
> 
> Have you actually tried this or are you supposing? 
How would i know what it did if i didn't try it?

> Where can I get the "newer"
> gdb?

sourceware.cygnus.com

Look at the gdb page.
> What version is the "newer" gdb?
>
You have a few choices.
You can get a 5.0 snapshot, or the main branch.
Doesn't matter, anything newer than February (when i became the C++
maintainer and started fixing this stuff) should work fine.
And does, for me.

On x86 Linux, and BeOS.
 
> -- DavidC
> 


       reply	other threads:[~2000-05-04 10:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200005041655.MAA10513@ll.mit.edu>
2000-05-04 10:41 ` Daniel Berlin [this message]
2000-05-04 10:42 ` Daniel Berlin
2000-05-04 12:40   ` David Cogen
     [not found] <66st9c39.fsf@dynamic-addr-88-42.resnet.rochester.edu>
2000-05-05 13:16 ` David Cogen
     [not found] <bt2ne3cq.fsf@dynamic-addr-88-117.resnet.rochester.edu>
2000-05-04 11:06 ` David Cogen
     [not found] <200005031637.MAA25467@ll.mit.edu>
2000-05-03 10:59 ` Mark Kettenis

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=Pine.LNX.4.10.10005041038260.27878-100000@propylaea.anduin.com \
    --to=dan@cgsoftware.com \
    --cc=cogen@ll.mit.edu \
    --cc=gdb@sourceware.cygnus.com \
    --cc=kettenis@wins.uva.nl \
    /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