HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- core dump on exceptional handling - TRY/CATCH
Operating System - HP-UX
1830350
Members
1823
Online
110001
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2007 10:37 PM
05-06-2007 10:37 PM
core dump on exceptional handling - TRY/CATCH
Hello,
We are currently working on migrating our application from HP-UX 11i to HP-UX 11V2. We were using DCE version 1.8 on 11i version and DCE 1.9 on our 11V2 server.
We recompiled our code and rebuilt our application. When we try to run our application, we get core dump error. While debugging using gdb, we found that it throws error when the code reaches 'TRY' exceptional handling. The same code works fine in 11i version.
Could you help us in resolving this issue? Kindly let us know whether any change has to be done in order to use the exceptional handling on 11V2/ DCE 1.9 version.
Thanks in advance for your help.
Regards,
Sathis Kumar.B
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2007 07:28 PM
05-13-2007 07:28 PM
Re: core dump on exceptional handling - TRY/CATCH
I assume this is the same as:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1120577
What does the macro TRY, etc. expand to?
Perhaps you can single step though the macro to see where it fails?
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1120577
What does the macro TRY, etc. expand to?
Perhaps you can single step though the macro to see where it fails?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2007 09:50 PM
05-13-2007 09:50 PM
Re: core dump on exceptional handling - TRY/CATCH
Below is a sample program we have tried it in HP-UX11i version and HP-UX11V2 version. It works fine in 11i but not in 11V2.
#define _PTHREADS_DRAFT4
#include
#include
/* prototyping of functions */
/* to allow type checks by */
/* the compiler */
#include "pthread_exc.h"
#include
void main()
{
int n;
char string[50];
/* strcpy(a,b) copies string b into a */
/* defined via the stdio.h header */
strcpy(string, "Hello World");
/* call own function */
n = n_char(string);
printf("Length of string = %d\n", n);
}
/* definition of local function n_char */
int n_char(char string[])
{
/* local variable in this function */
int n;
/* strlen(a) returns the length of */
/* string a */
/* defined via the string.h header */
TRY
printf("HAI \n");
CATCH_ALL
printf("CATCH_ALL \n");
ENDTRY
n = strlen(string);
if (n > 50)
printf("String is longer than 50 characters\n");
/* return the value of integer n */
return n;
}
In 11V2, the compilation goes through fine but not the execution. During execution, it throws 'core dump' error. While debugging, we observed that core occurs when TRY is called.
We would like to know, how to use the identifiers TRY/CATCH.. etc.. in 11V2 version? Please let me know if you need any other detail. FYI, the DCE version on 11V2 is 1.9.
#define _PTHREADS_DRAFT4
#include
#include
/* prototyping of functions */
/* to allow type checks by */
/* the compiler */
#include "pthread_exc.h"
#include
void main()
{
int n;
char string[50];
/* strcpy(a,b) copies string b into a */
/* defined via the stdio.h header */
strcpy(string, "Hello World");
/* call own function */
n = n_char(string);
printf("Length of string = %d\n", n);
}
/* definition of local function n_char */
int n_char(char string[])
{
/* local variable in this function */
int n;
/* strlen(a) returns the length of */
/* string a */
/* defined via the string.h header */
TRY
printf("HAI \n");
CATCH_ALL
printf("CATCH_ALL \n");
ENDTRY
n = strlen(string);
if (n > 50)
printf("String is longer than 50 characters\n");
/* return the value of integer n */
return n;
}
In 11V2, the compilation goes through fine but not the execution. During execution, it throws 'core dump' error. While debugging, we observed that core occurs when TRY is called.
We would like to know, how to use the identifiers TRY/CATCH.. etc.. in 11V2 version? Please let me know if you need any other detail. FYI, the DCE version on 11V2 is 1.9.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2007 10:28 AM
05-14-2007 10:28 AM
Re: core dump on exceptional handling - TRY/CATCH
I have no problems compiling and running your test case with these changes:
#define _PTHREADS_DRAFT4
libcma is NOT supported on 11.23, remove it.
You don't have a prototype for:
int n_char(char string[])
>void main()
The return type for main must be int.
>printf("HAI \n");
>printf("CATCH_ALL \n");
(You shouldn't have a space before the newline.)
I compiled your test case with:
$ cc -Ae itrc_dce.c -ldcecpkt
#define _PTHREADS_DRAFT4
libcma is NOT supported on 11.23, remove it.
You don't have a prototype for:
int n_char(char string[])
>void main()
The return type for main must be int.
>printf("HAI \n");
>printf("CATCH_ALL \n");
(You shouldn't have a space before the newline.)
I compiled your test case with:
$ cc -Ae itrc_dce.c -ldcecpkt
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP