Patch Name: PHSS_19005 Patch Description: s700_800 11.00 DDE v4.22(3) cumulative patch (DDE 4.22.P1) Creation Date: 99/06/30 Post Date: 99/07/19 Hardware Platforms - OS Releases: s700: 11.00 s800: 11.00 Products: DDE v4.22(3) Filesets: DDE.DDE,fr=B.11.01.06,fa=HP-UX_B.11.00_32/64,v=HP DDE.DDE-SB,fr=B.11.01.06,fa=HP-UX_B.11.00_32/64,v=HP Automatic Reboot?: No Status: General Release Critical: Yes PHSS_19005: CORRUPTION Category Tags: defect_repair enhancement general_release critical corruption Path Name: /hp-ux_patches/s700_800/11.X/PHSS_19005 Symptoms: PHSS_19005: The following symptoms correspond to the descriptions in the defect descriptions field for PHSS_19005: Note: some of these lines were wrapped to fit into a (required) 60 column format. 1) DDE 4.21 gives wrong result if assigning a value to a 'bit' variable. 2) DDE can't print struct if struct is the same name as srcfile. 3) dde> ?(dde/ui_line) Input error - Resources temporarily unavailable. 4) DDE 4.21.P3 'restart' command does not handle spaces in multiple args 5.) DDE 4.21 'list images -full' shows 'image is mapped READ-ONLY'. 6.) dde.bin: Improper context: host: "NULL" dir: "NULL" file: "a.out". 7.) DDE 4.2x gui is not displaying general registers correctly - line okay. 8.) DDE on 11.00: bad embedded pathname to libtt.1 in libDtSvc.1 9.) printing fully qualified names fails with `amb present. 10.)problem with ksh command edit mode. 11.)on simple ansi C example breakpoint setting fails. Defect Description: PHSS_19005: 1) DDE gives wrong result for assigning a value to a bit variable, the problem occurs when dde - print command is used to assign a value to a variable , here it is shown with the following example . Having one simple example code say as test.c : #include #include #include "test_h1.h" main( int argc, char **argv ) { SimPcSettei recdata; memset(&recdata, 0, sizeof(SimPcSettei)); return; } And the corresponding header file test_h1.h as : typedef struct HDF_SA_UA_ { unsigned short SA:9, UA:7; } HDF_SA_UA; typedef struct SimPcSet_Bdy_St { HDF_SA_UA saua; unsigned short blk_cnt1; HDF_SA_UA bef_saua; } SimPcSettei; Now compiling the code cc -g -o test test.c load the executable #dde -ui line (Warning) Commands dealing with key definitions are not supported in line mode. dde> debug test Executing image in process 10967: "/.../.../test". Break at: \\test\main\12 Source File: /.../.../test.c 12 B > memset(&recdata, 0, sizeof(SimPcSettei)); dde> giving print recdata dde> print recdata \\test\main\recdata: (record) \\test\main\recdata.saua: (record) \\test\main\recdata.saua.SA: 0 \\test\main\recdata.saua.UA: 0 \\test\main\recdata.blk_cnt1: 0 \\test\main\recdata.bef_saua: (record) \\test\main\recdata.bef_saua.SA: 0 \\test\main\recdata.bef_saua.UA: 0 Now trying to set say recdata.saua.SA=1 using dde> pri recdata.saua.SA=1 3 dde> It gives wrong result. also trying dde> print recdata \\test\main\recdata: (record) \\test\main\recdata.saua: (record) \\test\main\recdata.saua.SA: 3 \\test\main\recdata.saua.UA: 0 \\test\main\recdata.blk_cnt1: 0 \\test\main\recdata.bef_saua: (record) \\test\main\recdata.bef_saua.SA: 0 \\test\main\recdata.bef_saua.UA: 0 DDE shows the same wrong value to the variable. Resolution: Here the problem reported was happening because DDE was not doing the bit copy correctly , for setting a structure's field member which happens to be a bit field DDE was using this erroneous bit copy code and hence we were getting the wrong results. That bit copy code was corrected to fix the problem. 2) DDE can't print a struct if struct is same name as srcfile also DDE can't print variable with the same name as struct in C++. Here is the example code : myst.c struct myst { int inmyst; }; struct myst myst; int main() { myst.inmyst = 214; myst.inmyst = 342; } Now creating three executables with : cc -g myst.c -o a.cc.out CC -g myst.c -o a.CC.out aCC -g myst.c -o a.aCC.out Now when debugging # dde -ui line a.cc.out we get the expected result dde> debug a.cc.out Executing image in process 3759: "~/a.cc.out". Break at: \\c\main\4, 3 Source File: ~/myst.c 4 B > myst.inmyst = 214; dde> print myst \\myst: (record) \\myst.inmyst: 0 But, when debugging a.CC.out or a.aCC.out, you only get: dde> free; debug a.CC.out Executing image in process 3807: "~/a.CC.out". Break at: \\c\main\4 Source File: ~/myst.c 4 B > myst.inmyst = 214; dde> print myst myst: (record) Here if the name of the type is changed , both the type and the variable can be printed; $ more more myst2.c struct myst2 { int inmyst; }; struct myst2 myst; int main() { myst.inmyst = 214; myst.inmyst = 342; } $ CC -g myst2.c -o a.CC.out2 $ dde -ui line a.CC.out2 dde> pri myst2 myst2: (record) dde> pri myst myst: (record) myst.inmyst: 0 dde> pri (myst2) myst (record): (record) . inmyst: 0 Resolution: In cases where struct is same name as the variable or struct is same name as the srcfile , DDE can't print the struct, this was happening only for C++ and aCC , all this was happening since DDE was not doing the symbol lookup correctly for C++ and aCC in this given case , what DDE was doing in this case was looking up types first instead of names and hence it was failing; that lookup was corrected to solve this problem. 3) DDE ui_line gives : dde> ?(dde/ui_line) Input error - Resource temporarily unavailable in some cases, and it is getting killed thereafter. Here is the sample test case : io_nonblock.c #include #include #include #include int main () { int flags; fd_set rfds, exfds; char c; flags = fcntl (fileno (stdin), F_GETFL); /* Set stdin to non-blocking, note not non-delay. */ flags |= O_NONBLOCK; if (fcntl (fileno (stdin), F_SETFL, flags) == -1) { printf ("Failed to set flags: 0x%x\n", flags); return 0; } for (;;) { FD_ZERO (&rfds); FD_ZERO (&exfds); FD_SET (fileno (stdin), &rfds); FD_SET (fileno (stdin), &exfds); if (select (8, &rfds, NULL, &exfds, NULL) == -1) { printf ("select call failed\n"); return 0; } if (FD_ISSET (fileno (stdin), &exfds)) { printf ("stdin exception occurred\n"); return 0; } if (read (fileno (stdin), &c, 1) != 1) { printf ("read failed\n"); return 0; } putchar (c); if (c == 'q') { printf ("\nRead q, quitting\n"); break; } fflush (stdout); } return 0; } Now having DDE debug the given target program in line mode , do a "go" type "q" and then hit enter key and DDE fails , $ cc -g io_nonblock.c $ dde -ui line a.out Executing image in process 3019: "/home/janm/A5467620/a.out". Break at: \\io_nonblock\main\12 Source File: /home/janm/A5467620/io_nonblock.c 12 B > flags = fcntl (fileno (stdin), F_GETFL); dde> go q q Read q, quitting Break at: \\io_nonblock\main\51 51 B > } dde> dde> ?(dde/ui_line) Input error - Resource temporarily unavailable. $ dde -ui line -ver dde, version 4.21.P3 This problem is only with line-mode UI . Resolution: In this case with the line -mode UI, DDE was not saving some of the terminal attributes and it was not able to restore the file control flags when target returns control to DDE, this was causing the problem discussed with the given example. This was resolved by enabling DDE - line mode UI to save and restore the terminal attributes as needed. 4) DDE's 'restart' and 'debug' command does not correctly handle multiple arguments that contain spaces. Here it is shown with the followed example, test.c : $ more test1.C #include < iostream.h> main(int argc, char *argv[]) { cout < < "Hello World\n"; if (argc > 1) cout < < argv[1] < < "\n"; } $ CC -g test1.C $ dde -ui line a.out -- " 1" " 2 " dde, version 4.21.P4 User interface manager ui_line: Line-Mode UI, version 4.21.P4 Executing image in process 14155: "/home/janm/dde/a.out". Break at: \\test1\main\4 Source File: /home/janm/dde/test1.C 4 B > cout < < "Hello World\n"; dde> go;go Break at: \\test1\main\7 Hello World 1 Process 14155 has exited with status 80. dde> restart -args " 2" " 1 " Restarting: /home/janm/dde/a.out 2 1 (Warning) Restarting after program exit; monitors may not be restored correctly. Executing image in process 14156: "/home/janm/dde/a.out". Break at: \\test1\main\4 Source File: /home/janm/dde/test1.C 4 B > cout < < "Hello World\n"; dde> go;go Break at: \\test1\main\7 Hello World 2 1 < -- should only display "2" Process 14156 has exited with status 80. dde> restart -args \ 2 \ 1 Restarting: /home/janm/dde/a.out 2 1 (Warning) Restarting after program exit; monitors may not be restored correctly. Executing image in process 14158: "/home/janm/dde/a.out". Break at: \\test1\main\4 Source File: /home/janm/dde/test1.C 4 B > cout < < "Hello World\n"; dde> go;go Break at: \\test1\main\7 Hello World 2 < -- workaround displays correctly Process 14158 has exited with status 80. Similar Problem occurs with 'debug' command -------------------------------------------- $ more test.c /*******************************************************/ #include main (argc, argv) int argc; char *argv[]; { static char abc[100]; if (argc > 1) printf ("argument 1 is :%s:\n", argv[1]); printf ("argument 2 is :%s:\n", argv[2]); printf ("argument 3 is :%s:\n", argv[3]); } /*********************************************************/ $ cc test.c -g -o test.exe $ dde -ui line dde> debug test.exe abc " " ghi Executing image in process 20485: "/home/janm/test.exe". Break at: \\test\main\9 Source File: /home/janm/test.c 9 B > if (argc > 1) dde> go argument 1 is :abc: argument 2 is : : argument 3 is : ghi: Break at: \\test\main\14 14 B > } The problem occurs with DDE 4.03.P1, 4.21.P3 and 4.21.P4 and 4.22(3). Resolution: The problem was with the command line argument parsing in DDE, which was corrected in the main debugger to resolve this. 5) Here is the problem : When you attach a running program to dde version 4.21 it will show the shared libraries that the program is running with as being in a read-only state, that even if you do a "pxdb -s enable a.out" on the program file. This is misleading, since the "pxdb" and the dde command "prop lib -add", on that lib. will allow to set breakpoints in the shared library. Here are the test files and how we get to reproduce the problem : $ more main.c #include extern void funct1(); int main() { int myint; printf("starting test\n"); printf("input integer\n"); scanf("%d",&myint); funct1(); printf("after calling funct1\n"); } $ more funct1.c #include void funct1() { printf("!!!!!!!!!!\n"); printf("in funct1\n"); printf("exiting funct1\n"); } ------------------------ cc +z -c -g funct1.c ld -b -o libfunc.sl funct1.o cc -g main.c -L. -lfunc pxdb -s enable a.out Executing the program and attaching it to dde : a.out $ dde -ui line -att 9488 a.out Attached to process 9488; initializing "/home/janm/dde/ a.out" Stopped at: _read_sys+0010 (7AFFBF18) dde> list images -full It will show the shared lib as READ-ONLY name: /home/janm/dde/libfunc.sl system_id: PA-RISC 2.0 image is mapped READ-ONLY - symbolic debug information available section[1]: (TEXT) (0x7bea4000-0x7bea4fff) section[2]: (DATA) (0x7bea3000-0x7bea3fff) Resolution: "list images -full" command was not displaying the mapping information correctly for shared libraries, this was due to some erroneous address checking for shared library text relocation in DDE. This was corrected to resolve this problem. 6) Here is what the problem is : DDE cannot be run on any other machine except if it is the one , the home directory is on. It seems like it cannot resolve the path from the automounter. For e.g. here is the log of one of such attempts: $ dde comb5test dde.bin: Improper context: host: "NULL" dir: "NULL" file: "a.out" dde.bin: Improper context: host: "NULL" dir: "NULL" file: "a.out" Couldn't change directory to /u/ws/vikas/vikas/vikas/vikas/anal/higgs/lep_av. [ENOENT (2)] No such file or directory hpopo1.vikas.$ dde /u/ws/vikas/anal/higgs/comb5test dde.bin: Improper context: host: "NULL" dir: "NULL" file: "a.out" Couldn't change directory to /u/ws/vikas/vikas/vikas/vikas/anal/higgs/lep_av. [ENOENT (2)] No such file or directory Here the current directory is not the home directory. $pwd /u/ws/vikas/anal/higgs/lep_av So this problem is reproducible if you remsh to another machine and then try to load the executable in DDE-GUI. It is also found that trying to start DDE (GUI)- from a NFS mounted directory gives similar error messages $ pwd /nfs/krister/users $ dde dde.bin: Improper context: host: "NULL" dir: "NULL" file: "a.out" Couldn't change directory to /nfs/helm/users. [ENOENT (2)] No such file or directory This problem is only with the DDE , GUI , not with line mode. Resolution: There were problems with some softbench library in this case , and that library was updated to resolve this. 7) 11.0 DDE is not displaying the general registers correctly , here is the detail description of the problem, $ cc -g /opt/langtools/dde/examples/average.c -o average $ dde -ui line average dde, version 4.21.P3 User interface manager ui_line: Line-Mode UI, version 4.21.P3 Executing image in process 16606: "/home/janm/dde/average". Break at: \\average\main\44 Source File: /opt/langtools/dde/examples/average.c 44 B > print_average (my_list, first, last); dde> regs r0 : 0000000000000000 000000000DF95C00 000000007F6FE0FF 0000000000000001 r4 : 000000007F7E66A4 000000007F7E66AC 000000007F7E66AC 000000007F7E6790 r8 : 000000007F7E6790 000000007F7045D4 00000000000040DE 000000007F7045D8 r12: 000000000000002E 000000000000002D 0000000000000001 0000000000000000 r16: 0000000008000084 00000000FFFFF5FF 0000000008000084 0000000040001000 r20: 00000000072ED000 000000007F7E67D0 0000000000000000 000000000800001F r24: 000000007F7E66AC 000000007F7E66A4 0000000000000001 00000000400011E8 r28: 0000000000000000 00000000102DF600 000000007F7E6810 00000000C001090B pc: 0000000000003688 ipsw: 000000FF0004FD1F sar: 000000 0000000018 $ dde average - click on Show, Registers, General - it looks like the first column is displayed correctly (r0, r4, r8) but the other columns are not (r1, r2, f3, etc) . However just entering 'regs' in debugger Input shows all registers correctly. The Special Registers seem to display correctly in gui, but the Floating Point Registers show the same problem as the General Registers,if you change the precision from Single to Double or vice versa. Resolution: Here there were some problem with Softbench component and code changes were made to resolve this. 8) Starting DDE on 11.00 fails with the following errors : /usr/lib/dld.sl: Can't find path for shared library: libtt.1 /usr/lib/dld.sl: No such file or directory /opt/langtools/bin/dde[22]: 20103 Abort(coredump) This apparently happens on systems without a /usr/dt/lib/libtt.1 or /usr/lib/libtt.1 Resolution: This problem was resolved by enabling the correct path for the LibdtSvc.1 , which was giving the error. 9) DDE fails to print fully qualified symbol names that contain a `amb function name. Below is a transcript that demonstrates the problem , also shown is a sample code. Sample code:demo.C #include class demo { public: int i,j; demo(int k); demo(float f); }; demo::demo(int k) { i = k * 2; j = k * 6; } demo::demo(float f) { i = f * 2; j = f * 6; } void main() { int x=5; float y=12.34; demo d1(x), d2(y); cout << "d1.i = " << d1.i << endl; cout << "d1.j = " << d1.j << endl; cout << "d2.i = " << d2.i << endl; cout << "d2.j = " << d2.j << endl; } Now compiling this code with CC and loading on DDE , CC -g -o demo demo.C dde> debug demo Executing image in process 17267: "/tmp/demo". Break at: \\demo\main\25 Source File: /tmp/demo.cpp 25 B > int x=5; dde> ste Stepped to: \\demo\main\26 26 > float y=12.34; dde> ste Stepped to: \\demo\main\27 27 > demo d1(x), d2(y); dde> ste Stepped to: \\demo\`amb(demo::demo,int)\11 11 > { dde> tb `main(4): Stopped at: \\demo\`amb(demo::demo,int)\11 `main(3): Called from: \\demo\main\27 (00002714) `main(2): Called from: _start+0084 (7AF25D04) `main: Called from: $START$+012c (00001EB4) dde> list blocks -full `main(4) block \\demo\`amb(demo::demo,int) symbol \\demo\`amb(demo::demo,int)\this symbol \\demo\`amb(demo::demo,int)\k dde> print \\demo\`amb(demo::demo,int)\k ?(dde) Unexpected error in id package. ?(dde/lang_c++) ?empty line? ?(dde/lang_c++) ^syntax error in C expression DDE 4.01 gives the above shown warnings , when it fails to print the variable , however for DDE 4.03 and DDE 4.22(3) - there are no warnings , and DDE silently fails going to the next command prompt. dde> pri \\demo\`amb(demo::demo,int)\k dde> Resolution: DDE had certain problem in evaluating an expression or variable which was specified with its fully qualified name with 'amb present in it, the C language manager was modified to fix this. 10) It is found with DDE's ksh command mode that it doesn't work quite well with the "\" symbols. In particular if you add a "\" to a command and try ^e to get to the end of the line a "^e" is inserted instead. Resolution: DDE's ksh command input mode was not handling escape characters properly whenever there were '\' in the command line, it has been resolved by making '%' work as the escape character for emacs editing in DDE's ksh command edit mode. 11) Here is a sample program to reproduce the problem: SR: 1653288571 5003437483 4701411017 5003455360 5003445171 1653256503 5003454546 1653306142 Patch Files: DDE.DDE,fr=B.11.01.06,fa=HP-UX_B.11.00_32/64,v=HP: /opt/langtools/bin/dde /opt/langtools/bin/dde.bin /opt/langtools/dde/ui/ddegui /opt/langtools/dde/mgrs/ui_line /opt/langtools/dde/mgrs/ui_gui /opt/langtools/dde/mgrs/lang_c /opt/langtools/dde/mgrs/lang_c++ /opt/langtools/dde/mgrs/tgt_hpux_pa DDE.DDE-SB,fr=B.11.01.06,fa=HP-UX_B.11.00_32/64,v=HP: /opt/langtools/dde/softbench/lib/SB5.0/libfw-5.sl /opt/langtools/dde/softbench/lib/SB5.0/libDtSvc.1 what(1) Output: DDE.DDE,fr=B.11.01.06,fa=HP-UX_B.11.00_32/64,v=HP: /opt/langtools/bin/dde: None /opt/langtools/bin/dde.bin: HP92453-02A.11.00 HP-UX SYMBOLIC DEBUGGER (END.O ILP 32) $Revision: 75.02 $ HP Distributed Debugging Environment (HP/DDE) - Vers ion 4.22.P1 Rev: 990706.125912 /opt/langtools/dde/ui/ddegui: REV: 990626.193346, 9000/889 HP-UX B.10.20 sunil@hpc ll594 /opt/langtools/dde/mgrs/ui_line: HP/DDE User interface manager ui_line: Line-Mode UI - Version 4.22.P1 Rev: 990706.130344 /opt/langtools/dde/mgrs/ui_gui: HP DDE User interface manager ui_softdde: SoftBench UI interface to Softdebug+ - Version 4.22.P1 Rev: 990706.130439 REV: 970409.160253, 9000/879 HP-UX B.10.30 tedg@hydr a /opt/langtools/dde/mgrs/lang_c: HP/DDE Language manager lang_c: ANSI C - Version 4.2 2.P1 Rev: 990626.185022 /opt/langtools/dde/mgrs/lang_c++: HP/DDE Language manager lang_c++: C++ - Version 4.22 .P1 Rev: 990626.185117 /opt/langtools/dde/mgrs/tgt_hpux_pa: HP/DDE Target manager tgt_hpux_pa: HP-UX PA-RISC - V ersion 4.22.P1 Rev: 990706.130207 DDE.DDE-SB,fr=B.11.01.06,fa=HP-UX_B.11.00_32/64,v=HP: /opt/langtools/dde/softbench/lib/SB5.0/libfw-5.sl: REV: 980306.162434, 9000/780 HP-UX B.11.00 masonbld@ hpmason3 /opt/langtools/dde/softbench/lib/SB5.0/libDtSvc.1: libDtSvc: $Revision: 1.5 $ X Window System, Version 11 R5+ HP-UX B.10.30.00 -O (10.20 BE) (build date: Fri Mar 14 19:00:36 PST 1997) cksum(1) Output: DDE.DDE,fr=B.11.01.06,fa=HP-UX_B.11.00_32/64,v=HP: 759937799 1003 /opt/langtools/bin/dde 2976209837 1932288 /opt/langtools/bin/dde.bin 2715533008 3563336 /opt/langtools/dde/ui/ddegui 384203549 253952 /opt/langtools/dde/mgrs/ui_line 272431778 449912 /opt/langtools/dde/mgrs/ui_gui 608428382 544768 /opt/langtools/dde/mgrs/lang_c 1383474699 471040 /opt/langtools/dde/mgrs/lang_c++ 1358059921 352256 /opt/langtools/dde/mgrs/tgt_hpux_pa DDE.DDE-SB,fr=B.11.01.06,fa=HP-UX_B.11.00_32/64,v=HP: 784827325 296873 /opt/langtools/dde/softbench/lib/SB5.0/ libfw-5.sl 2581999372 655360 /opt/langtools/dde/softbench/lib/SB5.0/ libDtSvc.1 Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: None Equivalent Patches: None Patch Package Size: 8370 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_19005 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHSS_19005.depot By default swinstall will archive the original software in /var/adm/sw/save/PHSS_19005. If you do not wish to retain a copy of the original software, use the patch_save_files option: swinstall -x autoreboot=true -x patch_match_target=true \ -x patch_save_files=false -s /tmp/PHSS_19005.depot WARNING: If patch_save_files is false when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. For future reference, the contents of the PHSS_19005.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHSS_19005.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHSS_19005.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: This patch only patches DDE 4.22(3). If you have an earlier version of DDE, then you must install DDE 4.22(3) before you can apply the patch. Force applying this patch to an earlier version of DDE (earlier than 4.22(3))will totally break the older installed version of DDE.