From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29325 invoked by alias); 18 Mar 2004 04:46:36 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 29318 invoked from network); 18 Mar 2004 04:46:34 -0000 Received: from unknown (HELO snickers.hotpop.com) (38.113.3.51) by sources.redhat.com with SMTP; 18 Mar 2004 04:46:34 -0000 Received: from hotpop.com (kubrick.hotpop.com [38.113.3.103]) by snickers.hotpop.com (Postfix) with SMTP id DC7BC72E75 for ; Thu, 18 Mar 2004 04:13:19 +0000 (UTC) Received: from munco (unknown [203.129.254.138]) by smtp-3.hotpop.com (Postfix) with SMTP id 1F649DB91E5 for ; Thu, 18 Mar 2004 04:31:39 +0000 (UTC) Message-ID: <00cb01c40ca3$fb609570$4b0110ac@munco> From: "murugesan" To: References: <20040316141633.96FDE4B104@berman.michael-chastain.com> <1079497230.4953.25.camel@mun-co> <4057D4E0.1070901@codito.com> <1079503114.4954.30.camel@mun-co> Subject: Re: ptype of prototype of a funtion Date: Thu, 18 Mar 2004 04:46:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-HotPOP: ----------------------------------------------- Sent By HotPOP.com FREE Email Get your FREE POP email at www.HotPOP.com ----------------------------------------------- X-SW-Source: 2004-03/txt/msg00168.txt.bz2 After realising the prototype I am passing the correct parameter but it produces warning Here goes my script # cat dinesh Script started on Thu Mar 18 10:58:12 2004 # gcc -g test.c /home/dinesh/openssl-0.9.7c/libcrypto.sl.0.9.7 /home/dinesh/openssl-0.9.7c/libssl.sl.0.9.7 test.c: In function `main': test.c:10: warning: passing arg 3 of `PEM_read_bio_PKCS8_PRIV_KEY_INFO' from incompatible pointer type # gdb -q a.out (gdb) break main Breakpoint 1 at 0x2800: file test.c, line 9. (gdb) r Starting program: /home/dinesh/openssl_test/a.out Breakpoint 1, main () at test.c:9 9 bp=BIO_new_file(PATH"/pkcs8","r"); (gdb) n 10 PEM_read_bio_PKCS8_PRIV_KEY_INFO(bp,&pkcs8,&num, "test"); (gdb) ptype PEM_read_bio_PKCS8_PRIV_KEY_INFO type = struct pkcs8_priv_key_info_st { int broken; struct asn1_string_st *version; struct X509_algor_st *pkeyalg; struct asn1_type_st *pkey; struct stack_st *attributes; } *(struct bio_st *, struct pkcs8_priv_key_info_st **, int *, signed char *) (gdb) q The program is running. Exit anyway? (y or n) y # cat test.c #include #define PATH "./my_temp" main() { BIO *bp; FILE *fp; PKCS8_PRIV_KEY_INFO *pkcs8; int num; PEM_read_bio_PKCS8_PRIV_KEY_INFO(bp,&pkcs8,&num, "test"); } # script done on Thu Mar 18 10:58:52 2004 // For simplicity the program has been reduced ( parameters has not been initialized ) Regards, Murugesan ============================================================================ ======================= ----- Original Message ----- From: murugesan To: Ramana Radhakrishnan Cc: gdb@sources.redhat.com Sent: Wednesday, March 17, 2004 11:28 AM Subject: Re: ptype of prototype of a funtion Cool!! This is working I have been using the one which has not been built with debug option. I have the 2 OpenSSL 1 being built with debug option ( in different dir ) and the other without debug option ( in default location ) Thanks Ramana & Elizabeth for reminding me. Regards, Murugesan.