This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project. See the GDB home page for more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Hello all. Below are a set of patches required for UnixWare 2.1.x and UnixWare 7. I am still having trouble on SCO OpenServer 5. Is this list (gdb-patches) the right place to discuss them? If not, what IS the right list? Kean. diff -rcN gdb-4.16.97/bfd/aclocal.m4 newgdb/bfd/aclocal.m4 *** gdb-4.16.97/bfd/aclocal.m4 Thu Feb 5 18:13:59 1998 --- newgdb/bfd/aclocal.m4 Fri Apr 3 18:15:37 1998 *************** *** 241,247 **** *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. ! CFLAGS="$CFLAGS -belf" ;; esac] --- 241,250 ---- *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. ! case "$CC" in ! cc*) CFLAGS="$CFLAGS -belf" ;; ! gcc*) CFLAGS="$CFLAGS -melf" ;; ! esac ;; esac] diff -rcN gdb-4.16.97/bfd/config.bfd newgdb/bfd/config.bfd *** gdb-4.16.97/bfd/config.bfd Wed Feb 4 14:29:23 1998 --- newgdb/bfd/config.bfd Mon Apr 6 08:02:28 1998 *************** *** 156,165 **** i[3456]86-*-sco3.2v5*coff) targ_defvec=i386coff_vec ;; i[3456]86-*-sysv4* | i[3456]86-*-unixware | i[3456]86-*-solaris2* | \ i[3456]86-*-elf | i[3456]86-*-sco3.2v5* | i[3456]86-*-freebsdelf* | \ ! i[3456]86-*-dgux*) targ_defvec=bfd_elf32_i386_vec targ_selvecs=i386coff_vec ;; --- 156,166 ---- i[3456]86-*-sco3.2v5*coff) targ_defvec=i386coff_vec + targ_selvecs=bfd_elf32_i386_vec ;; i[3456]86-*-sysv4* | i[3456]86-*-unixware | i[3456]86-*-solaris2* | \ i[3456]86-*-elf | i[3456]86-*-sco3.2v5* | i[3456]86-*-freebsdelf* | \ ! i[3456]86-*-dgux* | i[3456]86-*-sysv5* | i[3456]86-UnixWare*-*) targ_defvec=bfd_elf32_i386_vec targ_selvecs=i386coff_vec ;; diff -rcN gdb-4.16.97/bfd/configure.host newgdb/bfd/configure.host *** gdb-4.16.97/bfd/configure.host Fri Oct 3 14:06:22 1997 --- newgdb/bfd/configure.host Mon Apr 6 09:48:17 1998 *************** *** 137,144 **** SHLIB_CFLAGS='-shared -h $(SONAME)' HLDFLAGS='-R $(libdir)' ;; ! *-*-sysv4*) ! SHLIB_CFLAGS='-shared -h $(SONAME)' HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;' ;; *-*-sunos*) --- 137,147 ---- SHLIB_CFLAGS='-shared -h $(SONAME)' HLDFLAGS='-R $(libdir)' ;; ! *-*-sysv4* | *-*-sysv5*) ! case "$(CC)" in ! gcc*) SHLIB_CFLAGS='-shared -h $(SONAME)' ;; ! *) SHLIB_CFLAGS='-G -h $(SONAME)' ;; ! esac HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;' ;; *-*-sunos*) diff -rcN gdb-4.16.97/config/mh-sysv5 newgdb/config/mh-sysv5 *** gdb-4.16.97/config/mh-sysv5 Wed Dec 31 16:00:00 1969 --- newgdb/config/mh-sysv5 Mon Apr 6 06:59:09 1998 *************** *** 0 **** --- 1,8 ---- + # Define SYSV as -DSYSV if you are using a System V operating system. + SYSV = -DSYSV -DSVR4 -DSVR5 + RANLIB = true + + # The l flag generates a warning from the SVR4 archiver, remove it. + AR_FLAGS = cr + + X11_EXTRA_LIBS = -lnsl diff -rcN gdb-4.16.97/configure.in newgdb/configure.in *** gdb-4.16.97/configure.in Wed Feb 4 14:27:07 1998 --- newgdb/configure.in Mon Apr 6 06:57:56 1998 *************** *** 149,154 **** --- 149,157 ---- mips*-*-sysv*) host_makefile_frag="${host_makefile_frag} config/mh-riscos" ;; + i[3456]86-*-sysv5*) + host_makefile_frag="${host_makefile_frag} config/mh-sysv5" + ;; i[3456]86-*-dgux*) host_makefile_frag="${host_makefile_frag} config/mh-dgux386" ;; *************** *** 598,604 **** i[3456]86-*-sco3.2v5*) # The linker does not yet know about weak symbols in COFF, # and is not configured to handle mixed ELF and COFF. ! noconfigdirs="$noconfigdirs gprof ld target-libgloss" ;; i[3456]86-*-sco*) noconfigdirs="$noconfigdirs gprof target-libgloss" --- 601,607 ---- i[3456]86-*-sco3.2v5*) # The linker does not yet know about weak symbols in COFF, # and is not configured to handle mixed ELF and COFF. ! noconfigdirs="$noconfigdirs ld target-libgloss" ;; i[3456]86-*-sco*) noconfigdirs="$noconfigdirs gprof target-libgloss" diff -rcN gdb-4.16.97/gdb/configure.host newgdb/gdb/configure.host *** gdb-4.16.97/gdb/configure.host Mon Mar 2 15:19:06 1998 --- newgdb/gdb/configure.host Mon Apr 6 08:57:56 1998 *************** *** 67,72 **** --- 67,74 ---- i[3456]86-*-sunos*) gdb_host=sun386 ;; i[3456]86-*-sysv3.2*) gdb_host=i386v32 ;; i[3456]86-*-sysv32*) gdb_host=i386v32 ;; + i[3456]86-UnixWare*-*) gdb_host=i386v42mp ;; + i[3456]86-*-sysv5*) gdb_host=i386v42mp ;; i[3456]86-*-sysv4.2MP) gdb_host=i386v42mp ;; i[3456]86-*-sysv4*) gdb_host=i386v4 ;; i[3456]86-*-unixware2*) gdb_host=i386v42mp ;; diff -rcN gdb-4.16.97/gdb/configure.tgt newgdb/gdb/configure.tgt *** gdb-4.16.97/gdb/configure.tgt Mon Mar 2 15:19:07 1998 --- newgdb/gdb/configure.tgt Mon Apr 6 10:23:21 1998 *************** *** 92,97 **** --- 92,99 ---- configdirs="${configdirs} gdbserver" ;; i[3456]86-*-solaris*) gdb_target=i386sol2 ;; i[3456]86-*-sunos*) gdb_target=sun386 ;; + i[3456]86-UnixWare*-*) gdb_target=i386v42mp ;; + i[3456]86-*-sysv5*) gdb_target=i386v42mp ;; i[3456]86-*-sysv4.2MP) gdb_target=i386v42mp ;; i[3456]86-*-sysv4*) gdb_target=i386v4 ;; i[3456]86-*-unixware2*) gdb_target=i386v42mp ;; diff -rcN gdb-4.16.97/gdb/procfs.c newgdb/gdb/procfs.c *** gdb-4.16.97/gdb/procfs.c Mon Jul 14 18:05:10 1997 --- newgdb/gdb/procfs.c Mon Apr 6 09:30:04 1998 *************** *** 54,59 **** --- 54,95 ---- #include "gdbcore.h" #include "gdbthread.h" + #if !defined(SYS_lwp_create) && defined(SYS_lwpcreate) + # define SYS_lwp_create SYS_lwpcreate + #endif + + #if !defined(SYS_lwp_exit) && defined(SYS_lwpexit) + # define SYS_lwp_exit SYS_lwpexit + #endif + + #if !defined(SYS_lwp_wait) && defined(SYS_lwpwait) + # define SYS_lwp_wait SYS_lwpwait + #endif + + #if !defined(SYS_lwp_self) && defined(SYS_lwpself) + # define SYS_lwp_self SYS_lwpself + #endif + + #if !defined(SYS_lwp_info) && defined(SYS_lwpinfo) + # define SYS_lwp_info SYS_lwpinfo + #endif + + #if !defined(SYS_lwp_private) && defined(SYS_lwpprivate) + # define SYS_lwp_private SYS_lwpprivate + #endif + + #if !defined(SYS_lwp_kill) && defined(SYS_lwpkill) + # define SYS_lwp_kill SYS_lwpkill + #endif + + #if !defined(SYS_lwp_suspend) && defined(SYS_lwpsuspend) + # define SYS_lwp_suspend SYS_lwpsuspend + #endif + + #if !defined(SYS_lwp_continue) && defined(SYS_lwpcontinue) + # define SYS_lwp_continue SYS_lwpcontinue + #endif + /* the name of the proc status struct depends on the implementation */ #ifdef HAVE_PSTATUS_T typedef pstatus_t gdb_prstatus_t; *************** *** 1689,1694 **** --- 1725,1784 ---- #if defined (SYS_lwp_sema_trywait) syscall_table[SYS_lwp_sema_trywait] = "lwp_sema_trywait"; #endif + #if defined(SYS_fstatvfs64) + syscall_table[SYS_fstatvfs64] = "fstatvfs64"; + #endif + #if defined(SYS_statvfs64) + syscall_table[SYS_statvfs64] = "statvfs64"; + #endif + #if defined(SYS_ftruncate64) + syscall_table[SYS_ftruncate64] = "ftruncate64"; + #endif + #if defined(SYS_truncate64) + syscall_table[SYS_truncate64] = "truncate64"; + #endif + #if defined(SYS_getrlimit64) + syscall_table[SYS_getrlimit64] = "getrlimit64"; + #endif + #if defined(SYS_setrlimit64) + syscall_table[SYS_setrlimit64] = "setrlimit64"; + #endif + #if defined(SYS_lseek64) + syscall_table[SYS_lseek64] = "lseek64"; + #endif + #if defined(SYS_mmap64) + syscall_table[SYS_mmap64] = "mmap64"; + #endif + #if defined(SYS_pread64) + syscall_table[SYS_pread64] = "pread64"; + #endif + #if defined(SYS_creat64) + syscall_table[SYS_creat64] = "creat64"; + #endif + #if defined(SYS_dshmsys) + syscall_table[SYS_dshmsys] = "dshmsys"; + #endif + #if defined(SYS_invlpg) + syscall_table[SYS_invlpg] = "invlpg"; + #endif + #if defined(SYS_cg_ids) + syscall_table[SYS_cg_ids] = "cg_ids"; + #endif + #if defined(SYS_cg_processors) + syscall_table[SYS_cg_processors] = "cg_processors"; + #endif + #if defined(SYS_cg_info) + syscall_table[SYS_cg_info] = "cg_info"; + #endif + #if defined(SYS_cg_bind) + syscall_table[SYS_cg_bind] = "cg_bind"; + #endif + #if defined(SYS_cg_current) + syscall_table[SYS_cg_current] = "cg_current"; + #endif + #if defined(SYS_cg_memloc) + syscall_table[SYS_cg_memloc] = "cg_memloc"; + #endif } /* *************** *** 1924,1930 **** #ifdef PROCFS_USE_READ_WRITE if (regno != -1) { ! procfs_read_status (pi); memcpy ((char *) &fpreg.fpregset, (char *) &pi->prstatus.pr_lwp.pr_context.uc_mcontext.fpregs, sizeof (fpregset_t)); --- 2014,2020 ---- #ifdef PROCFS_USE_READ_WRITE if (regno != -1) { ! /* JKJ CHECKME procfs_read_status (pi); */ memcpy ((char *) &fpreg.fpregset, (char *) &pi->prstatus.pr_lwp.pr_context.uc_mcontext.fpregs, sizeof (fpregset_t)); *************** *** 1975,1980 **** --- 2065,2072 ---- { struct procinfo *pi = (struct procinfo *) xmalloc (sizeof (struct procinfo)); + struct sig_ctl sctl; + struct flt_ctl fctl; memset ((char *) pi, 0, sizeof (*pi)); if (!open_proc_file (pid, pi, O_RDWR, 1)) *************** *** 2123,2132 **** --- 2215,2234 ---- int *statvalp; { struct procinfo *temp_pi, *next_pi; + struct proc_ctl pctl; + #ifdef UNIXWARE + pctl.cmd = PCRUN; + pctl.data = PRCFAULT; + #else pi->prrun.pr_flags = PRCFAULT; + #endif + #ifdef PROCFS_USE_READ_WRITE + if (write (pi->ctl_fd, (char *)&pctl, sizeof (struct proc_ctl)) < 0) + #else if (ioctl (pi->ctl_fd, PIOCRUN, &pi->prrun) != 0) + #endif perror_with_name (pi->pathname); if (attach_flag) *************** *** 2809,2814 **** --- 2911,2917 ---- #endif /* 0 */ + #ifndef UNIXWARE /* LOCAL FUNCTION *************** *** 2847,2853 **** } return (fd); } ! /* Attach to process PID, then initialize for debugging it and wait for the trace-trap that results from attaching. */ --- 2950,2956 ---- } return (fd); } ! #endif /* Attach to process PID, then initialize for debugging it and wait for the trace-trap that results from attaching. */ *************** *** 3065,3072 **** } add_thread (pi->pid); procfs_set_inferior_syscall_traps (pi); - } #endif /* PROCFS_USE_READ_WRITE */ attach_flag = 1; return (pi->pid); } --- 3168,3175 ---- } add_thread (pi->pid); procfs_set_inferior_syscall_traps (pi); #endif /* PROCFS_USE_READ_WRITE */ + } attach_flag = 1; return (pi->pid); } *************** *** 3247,3253 **** struct procinfo *pi; struct proc_ctl pctl; - #ifndef UNIXWARE if (pid != -1) /* Non-specific process? */ pi = NULL; else --- 3350,3355 ---- *************** *** 3269,3275 **** for (pi = procinfo_list; pi; pi = pi->next) if (pi->pid == pid && pi->had_event) break; - #endif if (!pi && !checkerr) goto wait_again; --- 3371,3376 ---- *************** *** 3305,3311 **** --- 3406,3416 ---- /* NOTREACHED */ } } + #ifdef UNIXWARE + else if (pi->prstatus.pr_lwp.pr_flags & (PR_STOPPED | PR_ISTOP)) + #else else if (pi->prstatus.pr_flags & (PR_STOPPED | PR_ISTOP)) + #endif { #ifdef UNIXWARE rtnval = pi->prstatus.pr_pid; *************** *** 3414,3420 **** if (!procinfo->had_event) { #ifdef PROCFS_USE_READ_WRITE ! cmd = PCSTOP; if (write (pi->ctl_fd, (char *) &cmd, sizeof (long)) < 0) { print_sys_errmsg (procinfo->pathname, errno); --- 3519,3525 ---- if (!procinfo->had_event) { #ifdef PROCFS_USE_READ_WRITE ! long cmd = PCSTOP; if (write (pi->ctl_fd, (char *) &cmd, sizeof (long)) < 0) { print_sys_errmsg (procinfo->pathname, errno); *************** *** 3449,3455 **** --- 3554,3564 ---- else { error ("PIOCWSTOP, stopped for unknown/unhandled reason, flags %#x", + #ifdef UNIXWARE + pi->prstatus.pr_lwp.pr_flags); + #else pi->prstatus.pr_flags); + #endif } store_waitstatus (ourstatus, statval); *************** *** 3725,3731 **** print_sys_errmsg (procinfo->pathname, errno); error ("PCRUN failed"); } - procfs_read_status (procinfo); #else procinfo->prrun.pr_flags &= PRSTEP; procinfo->prrun.pr_flags |= PRCFAULT | PRCSIG; --- 3834,3839 ---- *************** *** 3752,3760 **** print_sys_errmsg (procinfo->pathname, errno); warning ("PIOCRUN failed"); } } procfs_read_status (procinfo); - #endif } } --- 3860,3868 ---- print_sys_errmsg (procinfo->pathname, errno); warning ("PIOCRUN failed"); } + #endif } procfs_read_status (procinfo); } } *************** *** 4794,4800 **** --- 4902,4912 ---- if (summary || all) { info_proc_stop (pip, summary); + #ifdef UNIXWARE + supply_gregset (&pip->prstatus.pr_lwp.pr_context.uc_mcontext.gregs); + #else supply_gregset (&pip->prstatus.pr_reg); + #endif printf_filtered ("PC: "); print_address (read_pc (), gdb_stdout); printf_filtered ("\n"); *************** *** 5002,5008 **** { sysset_t sysset; int goterr, i; ! goterr = ioctl (pi->ctl_fd, PIOCGENTRY, &sysset) < 0; if (goterr && !errok) --- 5114,5121 ---- { sysset_t sysset; int goterr, i; ! ! #ifndef UNIXWARE goterr = ioctl (pi->ctl_fd, PIOCGENTRY, &sysset) < 0; if (goterr && !errok) *************** *** 5042,5047 **** --- 5155,5161 ---- error ("PIOCSEXIT failed"); } } + #endif if (!pi->syscall_handlers) { *************** *** 5106,5111 **** --- 5220,5226 ---- { sysset_t sysset; + #ifndef UNIXWARE if (flags & PROCFS_SYSCALL_ENTRY) { if (ioctl (pi->ctl_fd, PIOCGENTRY, &sysset) < 0) *************** *** 5141,5146 **** --- 5256,5262 ---- error ("PIOCSEXIT failed"); } } + #endif if (!pi->syscall_handlers) { *************** *** 5210,5215 **** --- 5326,5332 ---- { int lwp_id; struct procinfo *childpi; + struct proc_ctl pctl; /* We've just detected the completion of an lwp_create system call. Now we need to setup a procinfo struct for this thread, and notify the thread *************** *** 5218,5223 **** --- 5335,5353 ---- /* If lwp_create failed, then nothing interesting happened. Continue the process and go back to sleep. */ + #ifdef UNIXWARE + /* Joel ... can you check this logic out please? JKJ */ + if (pi->prstatus.pr_lwp.pr_context.uc_mcontext.gregs[R_EFL] & 1) + { /* _lwp_create failed */ + pctl.cmd = PCRUN; + pctl.data = PRCFAULT; + + if (write(pi->ctl_fd, (char *)&pctl, sizeof (struct proc_ctl)) < 0) + perror_with_name (pi->pathname); + + return 0; + } + #else /* UNIXWARE */ if (pi->prstatus.pr_reg[R_PSR] & PS_FLAG_CARRY) { /* _lwp_create failed */ pi->prrun.pr_flags &= PRSTEP; *************** *** 5228,5244 **** --- 5358,5382 ---- return 0; } + #endif /* At this point, the new thread is stopped at it's first instruction, and the parent is stopped at the exit from lwp_create. */ if (pi->new_child) /* Child? */ { /* Yes, just continue it */ + #ifdef UNIXWARE + pctl.cmd = PCRUN; + pctl.data = PRCFAULT; + + if (write(pi->ctl_fd, (char *)&pctl, sizeof (struct proc_ctl)) < 0) + #else /* UNIXWARE */ pi->prrun.pr_flags &= PRSTEP; pi->prrun.pr_flags |= PRCFAULT; if ((pi->prstatus.pr_flags & PR_ISTOP) && ioctl (pi->ctl_fd, PIOCRUN, &pi->prrun) != 0) + #endif /* !UNIXWARE */ perror_with_name (pi->pathname); pi->new_child = 0; /* No longer new */ *************** *** 5250,5256 **** --- 5388,5398 ---- in the child and continue the parent. */ /* Third arg is pointer to new thread id. */ + #ifdef UNIXWARE + lwp_id = read_memory_integer (pi->prstatus.pr_lwp.pr_sysarg[2], sizeof (int)); + #else lwp_id = read_memory_integer (pi->prstatus.pr_sysarg[2], sizeof (int)); + #endif lwp_id = (lwp_id << 16) | PIDGET (pi->pid); *************** *** 5265,5289 **** --- 5407,5448 ---- printf_filtered ("[New %s]\n", target_pid_to_str (lwp_id)); /* Continue the parent */ + #ifdef UNIXWARE + pctl.cmd = PCRUN; + pctl.data = PRCFAULT; + if (write(pi->ctl_fd, (char *)&pctl, sizeof (struct proc_ctl)) < 0) + #else pi->prrun.pr_flags &= PRSTEP; pi->prrun.pr_flags |= PRCFAULT; if (ioctl (pi->ctl_fd, PIOCRUN, &pi->prrun) != 0) + #endif perror_with_name (pi->pathname); /* The new child may have been created in one of two states: SUSPENDED or RUNNABLE. If runnable, we will simply signal it to run. If suspended, we flag it to be continued later, when it has an event. */ + #ifdef UNIXWARE + if (childpi->prstatus.pr_lwp.pr_why == PR_SUSPENDED) + #else if (childpi->prstatus.pr_why == PR_SUSPENDED) + #endif childpi->new_child = 1; /* Flag this as an unseen child process */ else { /* Continue the child */ + #ifdef UNIXWARE + pctl.cmd = PCRUN; + pctl.data = PRCFAULT; + + if (write(pi->ctl_fd, (char *)&pctl, sizeof (struct proc_ctl)) < 0) + #else childpi->prrun.pr_flags &= PRSTEP; childpi->prrun.pr_flags |= PRCFAULT; if (ioctl (childpi->ctl_fd, PIOCRUN, &childpi->prrun) != 0) + #endif perror_with_name (childpi->pathname); } return 0; diff -rcN gdb-4.16.97/ltconfig newgdb/ltconfig *** gdb-4.16.97/ltconfig Wed Sep 3 12:22:03 1997 --- newgdb/ltconfig Fri Apr 3 18:13:54 1998 *************** *** 431,436 **** --- 431,437 ---- pic_flag='-Kpic' link_static_flag='-dn' special_shlib_compile_flags='-belf' + wl="-Wl," ;; solaris2*) *************** *** 682,688 **** ;; sco3.2v5*) ! archive_cmds='$LD -G -o $lib$libobjs$deplibs' hardcode_direct=yes ;; --- 683,689 ---- ;; sco3.2v5*) ! archive_cmds='$LD -G -z text -h $soname -o $lib$libobjs$deplibs' hardcode_direct=yes ;; *************** *** 838,844 **** sco3.2v5*) version_type=osf ! soname_spec='$libname.so.$major' library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' shlibpath_var=LD_LIBRARY_PATH ;; --- 839,845 ---- sco3.2v5*) version_type=osf ! soname_spec='$libdir/$libname.so.$major' library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' shlibpath_var=LD_LIBRARY_PATH ;; diff -rcN gdb-4.16.97/opcodes/aclocal.m4 newgdb/opcodes/aclocal.m4 *** gdb-4.16.97/opcodes/aclocal.m4 Thu Feb 5 18:19:16 1998 --- newgdb/opcodes/aclocal.m4 Fri Apr 3 18:30:03 1998 *************** *** 175,181 **** *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. ! CFLAGS="$CFLAGS -belf" ;; esac] --- 175,184 ---- *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. ! case "$CC" in ! cc*) CFLAGS="$CFLAGS -belf" ;; ! gcc*) CFLAGS="$CFLAGS -melf" ;; ! esac ;; esac]