- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- debug error No symbol in current context when com...
Operating System - HP-UX
1753973
Members
7883
Online
108811
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
Discussions
Discussions
Forums
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
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
тАО07-09-2009 04:22 AM
тАО07-09-2009 04:22 AM
debug error No symbol in current context when compiling 64bit
I have following program (excerpt):
main(int argc, char *argv[])
{ char buffer [10+EN];
...
when debugging using /opt/langtools/bin/vdb -d . -d /users/progs/fors_neu/share/lib -d /users/progs/fors_neu/share/src -tty=/dev/$ttydev -xdb -tui obj/myprog
following error happens:
(wdb) p buffer
No symbol "buffer" in current context.
------------
compile command: (excerpt)
cc -D_ANSI_C_PROTOS_ -U__HP_CURSES -D_XOPEN_SOURCE_EXTENDED
-Agcc +w
-g
-L/usr/local/lib/hpux64 +DD64 -Wl,-z -Wl,+b
-I/usr/local/include -lpgport -lxnet -lz -lreadline -lm
-o obj/myprog myprog.c -lcurses
compiler version:
/opt/aCC/bin/cc: HP C/aC++ for Integrity Servers B3910B A.06.15 [May 16 2007]
debugger version:
HP VDB 2.0 is based on Vim 5.7
HP gdb 5.7 for HP Itanium (32 or 64 bit) and target HP-UX 11.2x.
Question: What causes the problem for the missing symbol???
main(int argc, char *argv[])
{ char buffer [10+EN];
...
when debugging using /opt/langtools/bin/vdb -d . -d /users/progs/fors_neu/share/lib -d /users/progs/fors_neu/share/src -tty=/dev/$ttydev -xdb -tui obj/myprog
following error happens:
(wdb) p buffer
No symbol "buffer" in current context.
------------
compile command: (excerpt)
cc -D_ANSI_C_PROTOS_ -U__HP_CURSES -D_XOPEN_SOURCE_EXTENDED
-Agcc +w
-g
-L/usr/local/lib/hpux64 +DD64 -Wl,-z -Wl,+b
-I/usr/local/include -lpgport -lxnet -lz -lreadline -lm
-o obj/myprog myprog.c -lcurses
compiler version:
/opt/aCC/bin/cc: HP C/aC++ for Integrity Servers B3910B A.06.15 [May 16 2007]
debugger version:
HP VDB 2.0 is based on Vim 5.7
HP gdb 5.7 for HP Itanium (32 or 64 bit) and target HP-UX 11.2x.
Question: What causes the problem for the missing symbol???
- Tags:
- gdb
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2009 05:57 AM
тАО07-09-2009 05:57 AM
Re: debug error No symbol in current context when compiling 64bit
buffer has not been used-therefore the error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2009 05:58 AM
тАО07-09-2009 05:58 AM
Re: debug error No symbol in current context when compiling 64bit
-----------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2009 07:48 PM
тАО07-09-2009 07:48 PM
Re: debug error No symbol in current context when compiling 64bit
> cc -D_ANSI_C_PROTOS_ -U__HP_CURSES
> -D_XOPEN_SOURCE_EXTENDED -Agcc +w -g
Since -Agcc is used cc should behave like GCC.
> buffer has not been used-therefore the error
But GCC's behaviiour is to emit debugging information for all types declared in a compilation unit, regardless of whether or not they are actually used in that compilation unit.
> compiler version: .... HP C/aC++ for Integrity Servers B3910B A.06.15 ....
This feature is available in PA cc (though not by default. It needs HPC_DEBUG_COMPAT).
$export HPC_DEBUG_COMPAT=1
$cc -g unused_char_arr_debug.c
$gdb a.out
....
(gdb) ptype buffer
type = char [10]
http://www.docs.hp.com/en/5991-4869/ch01s07.html#bgbghgib
HPC_DEBUG_COMPAT Environment Variable: HP C does not emit debug information for unused objects (structures, unions, and others) anymore with the -g option. For getting the older behavior (emitting debug information for all objects, irrespective of whether they are used in the program or not), the environment variable HPC_DEBUG_COMPAT can be set in the environment along with the -g option in the compilation command line. It suffices to define this environment variable to have an empty string; it does not need to be set to any particular value.
> -D_XOPEN_SOURCE_EXTENDED -Agcc +w -g
Since -Agcc is used cc should behave like GCC.
> buffer has not been used-therefore the error
But GCC's behaviiour is to emit debugging information for all types declared in a compilation unit, regardless of whether or not they are actually used in that compilation unit.
> compiler version: .... HP C/aC++ for Integrity Servers B3910B A.06.15 ....
This feature is available in PA cc (though not by default. It needs HPC_DEBUG_COMPAT).
$export HPC_DEBUG_COMPAT=1
$cc -g unused_char_arr_debug.c
$gdb a.out
....
(gdb) ptype buffer
type = char [10]
http://www.docs.hp.com/en/5991-4869/ch01s07.html#bgbghgib
HPC_DEBUG_COMPAT Environment Variable: HP C does not emit debug information for unused objects (structures, unions, and others) anymore with the -g option. For getting the older behavior (emitting debug information for all objects, irrespective of whether they are used in the program or not), the environment variable HPC_DEBUG_COMPAT can be set in the environment along with the -g option in the compilation command line. It suffices to define this environment variable to have an empty string; it does not need to be set to any particular value.
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.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP