Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: murugesan <mukeshgct@hotpop.com>
To: Michael Elizabeth Chastain <mec.gnu@mindspring.com>
Cc: "gdb@sources.redhat.com" <gdb@sources.redhat.com>
Subject: Re: ptype of prototype of a funtion
Date: Wed, 17 Mar 2004 04:20:00 -0000	[thread overview]
Message-ID: <1079497230.4953.25.camel@mun-co> (raw)
In-Reply-To: <20040316141633.96FDE4B104@berman.michael-chastain.com>

Hello Michael,
	Here goes what you wanted.

# cat dinesh
Script started on Wed Mar 17 09:31:16 2004
# cat dinesh.c
#include <openssl/ssl.h>
#include <openssl/rsa.h>

#define PATH "./dinesh_p_v"
#define MKDIR(PATH) mkdir(PATH,0755)
#define I_LIKE_DINESH 0

int main(int argc, char* argv[])
{
        FILE *fp;
        MKDIR(PATH);
        fp=fopen(PATH"/out","w");
        if(!fp)
        {
                fprintf(stderr,"\nError in creating the file
"PATH"/out\n");
        }
        else
        {
                if(PEM_write_PKCS8(fp,NULL)==0)
                {
                        fprintf(stderr,"\nError in calling the function
PEM_write\n");
                }
        }
        fclose(fp);
        fp=fopen(PATH"/out","r");
        if(PEM_read_PKCS8(fp,NULL,NULL,NULL)!=NULL)
        {
                fprintf(stderr,"\nError in calling the function
PEM_read\n");
        }
        fclose(fp);
        return I_LIKE_DINESH;
}
# gcc --version
gcc (GCC) 3.1
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
# gcc -g dinesh.c -lcrypto -lssl
# gdb a.out
HP gdb 3.3 for PA-RISC 1.1 or 2.0 (narrow), HP-UX 11.00.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 3.3 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for
warranty/support.
..
(gdb) break main
Breakpoint 1 at 0x2790: file dinesh.c, line 11.
(gdb) r
Starting program: /home/murugesh/openssl_test/a.out

Breakpoint 1, main (argc=1, argv=0x7dbf07c4) at dinesh.c:11
11              MKDIR(PATH);
(gdb) s
12              fp=fopen(PATH"/out","w");
(gdb)
13              if(!fp)
(gdb)
19                      if(PEM_write_PKCS8(fp,NULL)==0)
(gdb) ptype PEM_write_PKCS8
type = int ()
(gdb) ptype PEM_write_PKCS8()
type = int
(gdb) whatis PEM_write_PKCS8()
type = int
(gdb) whatis PEM_write_PKCS8
type = <text variable, no debug info>
(gdb) The program is running.  Exit anyway? (y or n) y
#

script done on Wed Mar 17 09:32:26 2004


I think I have covered all the answers for your questions.

Thanks,
Murugesan


=========================================================================================================
On Tue, 2004-03-16 at 19:46, Michael Elizabeth Chastain wrote:
> Hello Murugesan,
> 
>   gdb>ptype fun
>   type = int ()
> 
> Okay, I have some questions:
> 
>   What computer and operating system are you using?
>   What compiler are you using to compile 'fun'?
>   What version of the compiler are you using?
>   What command line switches do you use to compile your program?
>   What command line switches do you use to link your program?
> 
> Can you make a small sample program which shows this problem?
> Then use the 'script' command.  'cat' the program,
> compile and link the program, run gdb on the program,
> exit 'script', and mail us the typescript.
> 
> Michael C



  reply	other threads:[~2004-03-17  4:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-16 14:16 Michael Elizabeth Chastain
2004-03-17  4:20 ` murugesan [this message]
2004-03-17  4:35   ` Ramana Radhakrishnan
2004-03-17  5:58     ` murugesan
2004-03-18  4:46       ` murugesan
  -- strict thread matches above, loose matches on Subject: below --
2004-03-18 19:52 Michael Elizabeth Chastain
2004-03-17  5:19 Michael Elizabeth Chastain
2004-03-16 11:31 murugesan
2004-03-12 15:39 Michael Elizabeth Chastain
2004-03-12  7:53 murugesan
2004-03-12 15:39 ` Daniel Jacobowitz
2004-03-16  3:58   ` murugesan
2004-03-16 10:39     ` Muthukumar

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=1079497230.4953.25.camel@mun-co \
    --to=mukeshgct@hotpop.com \
    --cc=gdb@sources.redhat.com \
    --cc=mec.gnu@mindspring.com \
    /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