Patch Name: PHSS_9731 Patch Description: s700_800 10.X Cumulative patch to DDE v4.01 (DDE 4.01.P2) Creation Date: 97/01/06 Post Date: 97/03/07 Hardware Platforms - OS Releases: s700: 10.00 10.01 10.10 10.20 s800: 10.00 10.01 10.10 10.20 Products: DDE v4.01 Filesets: DDE.DDE Automatic Reboot?: No Status: General Superseded Critical: No Path Name: /hp-ux_patches/s700_800/10.X/PHSS_9731 Symptoms: PHSS_9731: The following symptoms correspond to the descriptions in the defect descriptions field for PHSS_9731: Note: some of these lines were wrapped to fit into a (required) 60 column format. 1) DDE warning Illegal modifier kind with -g on pure virtual template 2) DDE is not printing a constant allocated in VT correctly 3) When stepping over self recursive call, dde continues past initial call 4) real number not displayed correctly when using NLS. 5) Describe does not work properly on arrays with variable bounds 6) "Failed to attach" message could be more helpful 7) For deb -att, dde warns can't find file even though I provided full path. 8) On a PA-8000, if you attach, reg window shows 32-bits 9) DDE ignores image name with -attach 10) Can't debug dld bootstrap code (assembly window problem) 11) DDE 4.01 thru 4.01.P1 cannot run on pa1.0 12) HP ANSI C++ generated namespace member functions are not supported 13) SIGSEGV for printing class member via ptr to member (ANSI C++ only) 14) long double type incorrectly handled in overloaded name resolution 15) ANSI C++ template signatures with pointer types are never found. PHSS_9065: The following symptoms correspond to the descriptions in the defect descriptions field for PHSS_9065: Note: some of these lines were wrapped to fit into a (required) 60 column format. 1) Debugging optimized code:DDE can get a SIGSEGV and lock up 2) C++ exception handling (intercept) unsupported for non-archive programs. 3) Arrow disappears in main after restart with optimized code 4) Describe does not work properly on arrays with variable bounds 5) Debugging optimized code: Missing logicals from inner scope 6) Calls to alloca() cause DDE to incorrectly state the value of local vars 7) Fake stars bug to push out this patch. Defect Description: PHSS_9731: The following defect descriptions are for PHSS_9731: Note: some of these lines were wrapped to fit into a (required) 60 column format. This will make some message text look different from how it appears to the user. 1) Illegal modifier kind at DNTT index 0x.. encountered for a function Workaround: Ignore the DDE message. A nasty DDE warning that is not Serious. $ dde -ui line arc Illegal modifier kind at DNTT index 0xa32 encountered for a function. For the 10 different member functions of the template class allocator. Dennis This is a DDE error. See file small.c. It seems any pure virtual function in a template gives an error. Illegal modifier kind at DNTT index 0xe9 encountered for a function. VFUNC points to FUNCT. $ more small.c template class barf { public: virtual T* foo(T)=0; // causes the problem virtual T* roo(T); }; template T* barf::foo(T) { return 0; } template T* barf::roo(T) { return 0; } template class barf_der : public barf { public: int I; virtual T* foo(T); virtual T* roo(T); }; template T* barf_der::foo(T) { return 0; } template T* barf_der::roo(T) { return 0; } int main() { barf_der B; B.foo(0); B.roo(0); return 0; } 2) DDE seems to print out the wrong value when trying to display the value of a float point constant allocated in the VT. In the following program program test_l1 double precision GR4,x parameter( GR4 = 4e5 ) x = GR4 end DDE will print gr4: 400011.0625112881 when it should print 400000. In hex, gr4 is : 0x41186A000C0B0000 when it should be 0x41186A0000000000. 3) Enter a recursive function. "Step -over" a call to the function you are currently in. The target program does not stop until you are past the very first call to the function. Test program is in ~dschmitz/bugs/10.0 > e_dde -ui line bug.10631 Break at: \\bug.10631\main\30 Source File: /tmp_mnt/net/ishmael/disk2/ testing/bugs/10.0/bug.10631.c 30 B > for (i=0; i < LOOPS; ++i) { xdde> go -unt 18 DRILL 3 X 3 X 3 18 > num *= plunge (local_depth+1); Stopped at: \\bug.10631\plunge\18 xdde> step -over Break at: \\bug.10631\main\44 44 B > } 4) When using all versions of dde the display of real numbers when using LANG=fr_FR.iso885910 displays incorrectly 2 Program main0 3 real*4 myvar 4 B> myvar=10.3 5 B end 6 dde> b 5 dde> go Break at: \\main0\5 5 B> end asm: B> 5: 000023D4 _start+005c NOP tb: 1 > \\main0\5 dde> p myvar \\main0\myvar: 10,3.0 To duplicate export LANG=fr_FR.iso885910 prior to running dde. 5) When debugging the program below, program B294 integer ida1(2:10) call ja001(ida1,8) end SUBROUTINE JA001(NDS7) INTEGER IDA1(10-NDS7:10) IDA1(3) = 5 END DDE describes ida1 in subroutine as symbol "\\`image(a.out)\ja001\ja001\ida1" type: datatype: array size: 0 bits (0 bytes) base type: "integer*4" dimensions: dimension: 1 lower bound: 1075466492 upper bound: 2147483647 index type: datatype: subrange precision: 32 bits (4 bytes) size: 32 bits (4 bytes) base type: "integer*4" low: 1075466492 high: 2147483647 attributes: formal parameter, by reference The high bound is correct with the current beta version of the F90 compiler. In the first release, the high bound would be set correctly. The low bound is incorrect. In the debug info, the lowbound is marked as a dnttptr point to a DVAR _lb__1. If one prints this dynamic variable, we get "2" which is correct for this program. This program also fails with F77. 6) While attaching to a process that is invoked over NFS, the following message was seen: Failed to attach to process 9613 - Permission denied ?(dde) Target program attach of "9613" failed 7) deb -att 26287 /tmp/vanderbilt Unable to locate program file of attached process. Object file "vanderbilt" not found in current directory. Attached to process 26287; initializing "/tmp/vanderbilt". Unable to access object: vanderbilt.c Block address range has end before start. Stopped at: \\vanderbilt\electrician\27 (00003260) 8) Debugging on a PA-8000 system, I start a program in the background, and attach. If I bring up the general register window, it displays 32 bits for each register. It is probably the top 32 bits, since most everything is zero. If I don't attach to the program, I see 64 bit register values. 9) While debugging a program that invokes another program, sometimes the other program is incorrectly invoked. 10) Set a breakpoint in crt0, then rerun the executable. Then open an assembly window and start single-stepping by instruction. Four clicks will put you at 0xc0004560. The address that DDE displays, however, is 0xc00043d0. Scroll the window down so that you can see 0xc0004560. Note that the PC is not marked. Click on step instruction again, and DDE will automatically scroll the PC out of view, as it puts you back at 0xc00043d0. 11) Starting with V4.01 of DDE, the files tgt_hpux_pa and obj_som_som are shipped as PA.RISC 1.1 compiled files. This means they will not run correctly on most series 800 systems. obj_som_som: PA-RISC1.1 shared library -not stripped tgt_hpux_pa: PA-RISC1.1 shared library -not stripped 12) The problem is that a function in a namespace is now emitted into the debug information with the prepended namespace name (in the example below the "func" in M would be seen in SOM as M::func) and DDE is not able to find this in its symbol table. In the example below try, "break M::func". Note, that all the data members are available in the namespaces. Try "pri N::a" or "pri M::a". Here is a test case that may be used with the beta 2 HP ANSI C++ compiler to reproduce the problem: namespace N { int a = 1; } namespace M { int a = 2; int func() { return a; } } int a = 3; int func() { return a; } int main () { return func(); } 13) Using the "square_a" test in the DDE test suite with the DART 30 ANSI C++ compiler the following results (break at line 48 ): dde> pri s1.*pmi ?(dde/catgets) NLS message catalog access error. Unexpected error occurred: SIGSEGV (invalid memory accesss) Continuing despite the error... The problems stems from the fact that the compiler has implemented pointers to members differently. They are no longer 0 based. They are an offset from the start of the object but a BIAS of 2**29 is now added in to differenciate the first member of an object with the value for NULL. 14) lang_c++.c (which is also lang_c.c) isn't properly handling the long double type. Specifically, function determine_type doesn't grok it. This can cause DDE to choose the wrong function when trying to resolve a 'call' command to an overloaded C++ function name. For example, compile the following code, debug it, and try to do: % dde overloads dde> step -over dde> call x.add(L'c') (You may need to compile with the -ext option and the /CLO/BUILD_ENV CC to have it accept the long double type.) I would imagine C rules probably would cast L'c' to int or perhaps long, but we're choosing the long double case! It happens not because we explicitly think L'c' ==> long double is the correct implicit cast, but because determine_type returns LANG_C_DTC_UNKNOWN, and because compare_data_types thinks that if either of a pair of DTC's is "unknown", that an exact match is the result. (!) (I expect to soon add a test that covers this case, among others to better exercise our paramter-matching/name-resolution code in the C++ language manager.) ---------------- #include #include class overloads { public : add (long double ld); add (int i); overloads (void); ~overloads (void); private : }; overloads::add (long double ld) { printf ("add (long double)\n"); } overloads::add (int i) { printf ("add (int)\n"); } overloads::overloads(void) { printf ("ctor (overloads)\n"); } overloads::~overloads(void) { printf ("dtor (overloads)\n"); } main () { overloads x; x.add (1); x.add (1.0); } 15) Try: desc Q > or desc Q > with ts12135 in the debugger test suite using the ANSI C++ compiler. The result is either a syntax error or the class is not found. This class is not available because the type signature never matches. Another problem has just appeared - desc P This doesn't work anymore. With some of the BETA versions of aCC this was OK but now it seems that the signature of the function has changed. Cfront and the old aCC compilers enter the type as "P" in the SOM and now the signature looks like "P". PHSS_9065: The following defect descriptions are for PHSS_9065: Note: some of these lines were wrapped to fit into a (required) 60 column format. This will make some message text look different from how it appears to the user. 1) While debuging an optimized program with DDE, bring the assembly display, and then step -crit five (or is it six) times. DDE will report a SIGSEGV, and DDE is hung. The assembly display must be up for the bug to occur. 2) The "intercept throw" and "intercept catch" commands are broken for C++ programs that are linked with shared language support libraries. dde will issue an error after the commands are issued: dde> inter throw C++ library not linked into target or out of date. Interception of C++ exception handling events unavailable. 3) After a restart the source display sometimes loses track of the Logical location mark - the arrow. This doesn't happen immediately, but once it does, there is no way to get it back. It also only loses the arrow in the main program. When it enters a subroutine, it displays the arrow correctly. Then when it returns to main, it loses it, again. 4) When debugging the program below, program B294 integer ida1(2:10) call ja001(ida1,8) end SUBROUTINE JA001(NDS7) INTEGER IDA1(10-NDS7:10) IDA1(3) = 5 END DDE describes ida1 in subroutine as symbol "\\`image(a.out)\ja001\ja001\ida1" type: datatype: array size: 0 bits (0 bytes) base type: "integer*4" dimensions: dimension: 1 lower bound: 1075466492 upper bound: 2147483647 index type: datatype: subrange precision: 32 bits (4 bytes) size: 32 bits (4 bytes) base type: "integer*4" low: 1075466492 high: 2147483647 attributes: formal parameter, by reference The high bound is correct with the current beta version of the F90 compiler. In the first release, the high bound would be set correctly. The low bound is incorrect. If one prints this dynamic variable, we get "2" which is correct for this program. This program also fails with F77. {Note that the upper is "correct", this is a special flag value that conveys the the upper bound is variable based} 5) The problem is that dde fails to record the logicals for line 13, 14 and 15, and hence steps over them. The line table info for these lines is present, but dde's assembly and stepping behavior indicates that these lines are not present in dde's line table. test program: foo.c. On running dde and stopping in verify() line 12, dde's assembly doesn't show logicals. 6) /* Compile with: * cc -Aa -g -o alloc alloc.c */ #include #include int main (void) { int a, b, c; int *pi; a = 1; b = 2; c = 3; /* First debug breakpoint here */ /* Use dde to print the values a, b, c * Observe that their values are 1, 2, and 3. */ pi = alloca (3 * sizeof (int)); if (!pi) { fprintf (stderr, "Unable to alloca space!\n"); exit (1); } /* Second debug breakpoint here */ /* Use dde to print the values a, b, c. * DDE will incorrectly show that they are 0, 0, and 0, * whereas executing the next printf statement will * correctly print that they are * 1, 2, 3, respectively. */ printf ("a = %d, b = %d, c = %d\n", a, b, c); return (0); } The problem is that the value of local variables are displayed incorrectly in frames that call alloca(). 7) Fake stars bug to push out this patch. SR: 1653153460 5003342808 5003347245 5003348805 Patch Files: /opt/langtools/bin/dde.bin /opt/langtools/dde/mgrs/obj_som_som /opt/langtools/dde/mgrs/tgt_hpux_pa /opt/langtools/dde/mgrs/ui_gui /opt/langtools/dde/mgrs/lang_c++ /opt/langtools/dde/ui/ddegui /opt/langtools/dde/lib/nls/msg/C/obj_mgr.cat /opt/langtools/dde/lib/nls/msg/C/dbgk_hpux_pa.cat /opt/langtools/dde/softbench/config/softtypes/config/C/ softtypes /opt/langtools/dde/contrib/support_macros.tar.Z what(1) Output: /opt/langtools/bin/dde.bin: HP92453-02A.10.00 HP-UX SYMBOLIC DEBUGGER (END.O) $R evision: 74.03 $ HP Distributed Debugging Environment (HP/DDE) - Vers ion 4.01.P2 Rev: 970129.111959 REV: 950209.102443, 9000/7 /opt/langtools/dde/mgrs/obj_som_som: HP/DDE Object manager obj_som_som: HP SOM - Version 4.01.P2 Rev: 970129.113011 /opt/langtools/dde/mgrs/tgt_hpux_pa: HP/DDE Target manager tgt_hpux_pa: HP-UX PA-RISC - V ersion 4.01.P2 Rev: 970129.113528 /opt/langtools/dde/mgrs/ui_gui: HP DDE User interface manager ui_softdde: SoftBench UI interface to Softdebug+ - Version 4.01.P2 Rev: 970129.112400 REV: 960125.181932, 9000/715 HP-UX B.10.01 masonbld@ hydra /opt/langtools/dde/mgrs/lang_c++: HP/DDE Language manager lang_c++: C++ - Version 4.01 .P2 Rev: 970129.113814 /opt/langtools/dde/ui/ddegui: REV: 970110.165953, 9000/735 HP-UX B.10.01 dde@gish /opt/langtools/dde/lib/nls/msg/C/obj_mgr.cat: None /opt/langtools/dde/lib/nls/msg/C/dbgk_hpux_pa.cat: None /opt/langtools/dde/softbench/config/softtypes/config/C/ softtypes: None /opt/langtools/dde/contrib/support_macros.tar.Z: None cksum(1) Output: 3909019929 2351516 /opt/langtools/bin/dde.bin 3455012610 176646 /opt/langtools/dde/mgrs/obj_som_som 2928395949 903683 /opt/langtools/dde/mgrs/tgt_hpux_pa 3544084077 382330 /opt/langtools/dde/mgrs/ui_gui 756386627 438750 /opt/langtools/dde/mgrs/lang_c++ 3445697467 3721181 /opt/langtools/dde/ui/ddegui 803943283 4750 /opt/langtools/dde/lib/nls/msg/C/obj_mgr.cat 1022179080 5202 /opt/langtools/dde/lib/nls/msg/C/ dbgk_hpux_pa.cat 2171382099 2478 /opt/langtools/dde/softbench/config/ softtypes/config/C/softtypes 2790708368 67483 /opt/langtools/dde/contrib/ support_macros.tar.Z Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHSS_9065 Equivalent Patches: None Patch Package Size: 7970 Kbytes Installation Instructions: Please review all instructions and the Hewlett-Packard SupportLine User Guide or your Hewlett-Packard support terms and conditions for precautions, scope of license, restrictions, and, limitation of liability and warranties, before installing this patch. ------------------------------------------------------------ 1. Back up your system before installing a patch. 2. Login as root. 3. Copy the patch to the /tmp directory. 4. Move to the /tmp directory and unshar the patch: cd /tmp sh PHSS_9731 5a. For a standalone system, run swinstall to install the patch: swinstall -x autoreboot=true -x match_target=true \ -s /tmp/PHSS_9731.depot 5b. For a homogeneous NFS Diskless cluster run swcluster on the server to install the patch on the server and the clients: swcluster -i -b This will invoke swcluster in the interactive mode and force all clients to be shut down. WARNING: All cluster clients must be shut down prior to the patch installation. Installing the patch while the clients are booted is unsupported and can lead to serious problems. The swcluster command will invoke an swinstall session in which you must specify: alternate root path - default is /export/shared_root/OS_700 source depot path - /tmp/PHSS_9731.depot To complete the installation, select the patch by choosing "Actions -> Match What Target Has" and then "Actions -> Install" from the Menubar. 5c. For a heterogeneous NFS Diskless cluster: - run swinstall on the server as in step 5a to install the patch on the cluster server. - run swcluster on the server as in step 5b to install the patch on the cluster clients. By default swinstall will archive the original software in /var/adm/sw/patch/PHSS_9731. If you do not wish to retain a copy of the original software, you can create an empty file named /var/adm/sw/patch/PATCH_NOSAVE. Warning: If this file exists when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. It is recommended that you move the PHSS_9731.text file to /var/adm/sw/patch for future reference. To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHSS_9731.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: This patch only patches DDE 4.01. If you have an earlier version of DDE, then you must install DDE 4.01 before you can apply the patch. Force applying this patch to an earlier version of DDE (earlier than 4.01) will totally break the older installed version of DDE.