ups-cvs Mailing List for UPS debugger (Page 3)
Brought to you by:
ianedwards
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(11) |
Nov
(49) |
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(1) |
Feb
|
Mar
(10) |
Apr
(5) |
May
|
Jun
(5) |
Jul
(19) |
Aug
(29) |
Sep
(3) |
Oct
(1) |
Nov
(8) |
Dec
|
2004 |
Jan
|
Feb
(20) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
2005 |
Jan
(1) |
Feb
(10) |
Mar
(5) |
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2006 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(4) |
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(11) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(3) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2012 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(34) |
Feb
(3) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Tom H. <th...@us...> - 2010-10-14 09:25:18
|
Update of /cvsroot/ups/ups/lib/libdwarf/cmplrs In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv5264/lib/libdwarf/cmplrs Modified Files: dwarf_addr_finder.h Log Message: Update libdwarf to 20100930 release. |
From: Tom H. <th...@us...> - 2009-07-13 13:47:46
|
Update of /cvsroot/ups/ups/ups In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14277 Modified Files: ao_ptrace.c ao_ptrace.h ao_stack.c ao_stack.h ao_target.c ao_target.h config.c obj_signal.c obj_stack.c target.h xc_text.c Log Message: Report the fault address when possible if we get a signal that is associated with a particular address. Index: ao_ptrace.h =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_ptrace.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ao_ptrace.h 18 Feb 2004 15:06:40 -0000 1.7 --- ao_ptrace.h 13 Jul 2009 13:47:37 -0000 1.8 *************** *** 53,56 **** --- 53,71 ---- #endif + #if defined(OS_LINUX) + #ifndef PTRACE_SETOPTIONS + #define PTRACE_SETOPTIONS 0x4200 + #endif + #ifndef PTRACE_GETEVENTMSG + #define PTRACE_GETEVENTMSG 0x4201 + #endif + #ifndef PTRACE_GETSIGINFO + #define PTRACE_GETSIGINFO 0x4202 + #endif + #ifndef PTRACE_SETSIGINFO + #define PTRACE_SETSIGINFO 0x4203 + #endif + #endif + #if defined (OS_BSD44) /* Index: ao_stack.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_stack.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ao_stack.c 20 Dec 2005 12:43:12 -0000 1.14 --- ao_stack.c 13 Jul 2009 13:47:37 -0000 1.15 *************** *** 1322,1330 **** const char * ! ao_get_signal_tag(xp, signo) target_t *xp; int signo; { ! return (signo == -1) ? "<unknown signal number>" : signame(signo); } --- 1322,1331 ---- const char * ! ao_get_signal_tag(xp, signo, siginfo) target_t *xp; int signo; + const siginfo_t *siginfo; { ! return (signo == -1) ? "<unknown signal number>" : signame(signo, siginfo); } Index: xc_text.c =================================================================== RCS file: /cvsroot/ups/ups/ups/xc_text.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** xc_text.c 22 Jun 2006 09:08:40 -0000 1.11 --- xc_text.c 13 Jul 2009 13:47:37 -0000 1.12 *************** *** 133,136 **** --- 133,137 ---- static tstate_t xc_get_state PROTO((target_t *xp)); static int xc_get_lastsig PROTO((target_t *xp)); + static const siginfo_t *xc_get_lastsiginfo PROTO((target_t *xp)); static stopres_t xc_get_stopres PROTO((target_t *xp)); static sigstate_t xc_get_sigstate PROTO((target_t *xp, int sig)); *************** *** 160,164 **** static ci_exec_result_t single_step_machine PROTO((machine_t *ma)); static int load_symtab PROTO((fil_t *fil)); ! static const char *xc_get_signal_tag PROTO((target_t *xp, int sig)); static xc_tdata_t *make_xtd PROTO((alloc_pool_t *ap, machine_t *ma, symtab_t *st)); --- 161,166 ---- static ci_exec_result_t single_step_machine PROTO((machine_t *ma)); static int load_symtab PROTO((fil_t *fil)); ! static const char *xc_get_signal_tag PROTO((target_t *xp, int sig, ! const siginfo_t *siginfo)); static xc_tdata_t *make_xtd PROTO((alloc_pool_t *ap, machine_t *ma, symtab_t *st)); *************** *** 193,197 **** NULL, NULL, xc_is_attached, NULL, xc_get_addrsize, ! xc_get_state, xc_get_lastsig, xc_get_stopres, xc_get_sigstate, xc_get_stack_trace, NULL, xc_get_signal_tag, xc_read_fpval, NULL, xc_readreg, xc_setreg, NULL, NULL, --- 195,200 ---- NULL, NULL, xc_is_attached, NULL, xc_get_addrsize, ! xc_get_state, xc_get_lastsig, xc_get_lastsiginfo, ! xc_get_stopres, xc_get_sigstate, xc_get_stack_trace, NULL, xc_get_signal_tag, xc_read_fpval, NULL, xc_readreg, xc_setreg, NULL, NULL, *************** *** 217,221 **** NULL, NULL, xc_is_attached, NULL, xc_get_addrsize, ! xc_get_state, xc_get_lastsig, xc_get_stopres, xc_get_sigstate, xc_get_stack_trace, NULL, xc_get_signal_tag, xc_read_fpval, NULL, xc_readreg, xc_setreg, NULL, NULL, --- 220,225 ---- NULL, NULL, xc_is_attached, NULL, xc_get_addrsize, ! xc_get_state, xc_get_lastsig, xc_get_lastsiginfo, ! xc_get_stopres, xc_get_sigstate, xc_get_stack_trace, NULL, xc_get_signal_tag, xc_read_fpval, NULL, xc_readreg, xc_setreg, NULL, NULL, *************** *** 638,641 **** --- 642,652 ---- } + static const siginfo_t * + xc_get_lastsiginfo(xp) + target_t *xp; + { + return NULL; + } + static stopres_t xc_get_stopres(xp) *************** *** 707,718 **** static const char * ! xc_get_signal_tag(xp, sig) target_t *xp; int sig; { ci_exec_result_t res; if (sig > 0) ! return signame(sig); res = (ci_exec_result_t)(-sig - 1); --- 718,730 ---- static const char * ! xc_get_signal_tag(xp, sig, siginfo) target_t *xp; int sig; + const siginfo_t *siginfo; { ci_exec_result_t res; if (sig > 0) ! return signame(sig, siginfo); res = (ci_exec_result_t)(-sig - 1); Index: ao_ptrace.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_ptrace.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ao_ptrace.c 26 Jun 2008 13:39:52 -0000 1.12 --- ao_ptrace.c 13 Jul 2009 13:47:37 -0000 1.13 *************** *** 124,127 **** --- 124,128 ---- static int get_words PROTO((int pid, ptracereq_t ptrace_req, taddr_t addr, char *buf, size_t nbytes)); + static void get_siginfo PROTO((iproc_t *ip)); #ifndef AO_HAS_PTRACE_RANGE *************** *** 243,246 **** --- 244,265 ---- } + static void + get_siginfo(ip) + iproc_t *ip; + { + #ifdef PTRACE_GETSIGINFO + siginfo_t siginfo; + + if (std_ptrace(PTRACE_GETSIGINFO, ip->ip_pid, NULL, &siginfo) == 0) { + if (ip->ip_lastsiginfo == NULL) + ip->ip_lastsiginfo = alloc(ip->ip_apool, sizeof(siginfo_t)); + + memcpy(ip->ip_lastsiginfo, &siginfo, sizeof(siginfo)); + } + else { + ip->ip_lastsiginfo = NULL; + } + #endif + } /* Wait for process xp to stop. If the process didn't die, update the *************** *** 333,336 **** --- 352,356 ---- stopres = SR_SIG; ip->ip_lastsig = WSTOPSIG(status); + get_siginfo(ip); } else if (user_stopped_target) Index: config.c =================================================================== RCS file: /cvsroot/ups/ups/ups/config.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** config.c 15 Jul 2008 14:25:55 -0000 1.5 --- config.c 13 Jul 2009 13:47:37 -0000 1.6 *************** *** 30,33 **** --- 30,34 ---- #include <stdlib.h> #include <string.h> + #include <signal.h> #include <errno.h> Index: ao_stack.h =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_stack.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** ao_stack.h 26 Oct 2002 13:06:32 -0000 1.1.1.1 --- ao_stack.h 13 Jul 2009 13:47:37 -0000 1.2 *************** *** 26,28 **** Stack *ao_get_stack_trace PROTO((target_t *xp)); taddr_t ao_get_reg_addr PROTO((target_t *xp, Stack *stk, int reg)); ! const char *ao_get_signal_tag PROTO((target_t *xp, int signo)); --- 26,29 ---- Stack *ao_get_stack_trace PROTO((target_t *xp)); taddr_t ao_get_reg_addr PROTO((target_t *xp, Stack *stk, int reg)); ! const char *ao_get_signal_tag PROTO((target_t *xp, int signo, ! const siginfo_t *siginfo)); Index: target.h =================================================================== RCS file: /cvsroot/ups/ups/ups/target.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** target.h 21 Jun 2006 16:25:27 -0000 1.6 --- target.h 13 Jul 2009 13:47:37 -0000 1.7 *************** *** 262,265 **** --- 262,266 ---- tstate_t (*xo_get_state)PROTO((target_t *xp)); int (*xo_get_lastsig)PROTO((target_t *xp)); + const siginfo_t *(*xo_get_lastsiginfo)PROTO((target_t *xp)); stopres_t (*xo_get_stopres)PROTO((target_t *xp)); sigstate_t (*xo_get_sigstate)PROTO((target_t *xp, int sig)); *************** *** 269,273 **** Stack *(*xo_get_stack_trace)PROTO((target_t *xp)); taddr_t (*xo_get_reg_addr)PROTO((target_t *xp, Stack *stk, int reg)); ! const char *(*xo_get_signal_tag)PROTO((target_t *xp, int signo)); /* Reading and writing data. --- 270,275 ---- Stack *(*xo_get_stack_trace)PROTO((target_t *xp)); taddr_t (*xo_get_reg_addr)PROTO((target_t *xp, Stack *stk, int reg)); ! const char *(*xo_get_signal_tag)PROTO((target_t *xp, int signo, ! const siginfo_t *siginfo)); /* Reading and writing data. *************** *** 376,379 **** --- 378,383 ---- #define xp_get_lastsig(xp) \ (xp->xp_ops->xo_get_lastsig)(xp) + #define xp_get_lastsiginfo(xp) \ + (xp->xp_ops->xo_get_lastsiginfo)(xp) #define xp_get_stopres(xp) \ (xp->xp_ops->xo_get_stopres)(xp) *************** *** 383,388 **** #define xp_get_stack_trace(xp) \ (xp->xp_ops->xo_get_stack_trace)(xp) ! #define xp_get_signal_tag(xp, signo) \ ! (xp->xp_ops->xo_get_signal_tag)(xp, signo) #define xp_get_reg_addr(xp, stk, reg) \ (xp->xp_ops->xo_get_reg_addr)(xp, stk, reg) --- 387,392 ---- #define xp_get_stack_trace(xp) \ (xp->xp_ops->xo_get_stack_trace)(xp) ! #define xp_get_signal_tag(xp, signo, siginfo) \ ! (xp->xp_ops->xo_get_signal_tag)(xp, signo, siginfo) #define xp_get_reg_addr(xp, stk, reg) \ (xp->xp_ops->xo_get_reg_addr)(xp, stk, reg) *************** *** 431,435 **** int get_startup_stop_addrs PROTO((target_t *xp, taddr_t *main_addr, taddr_t *main_min_bpt_addr)); ! const char *signame PROTO((int sig)); bool can_get_target_vars PROTO((target_t *xp)); bool target_process_exists PROTO((target_t *xp)); --- 435,439 ---- int get_startup_stop_addrs PROTO((target_t *xp, taddr_t *main_addr, taddr_t *main_min_bpt_addr)); ! const char *signame PROTO((int sig, const siginfo_t *siginfo)); bool can_get_target_vars PROTO((target_t *xp)); bool target_process_exists PROTO((target_t *xp)); Index: ao_target.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_target.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ao_target.c 22 Nov 2007 10:53:46 -0000 1.14 --- ao_target.c 13 Jul 2009 13:47:37 -0000 1.15 *************** *** 95,98 **** --- 95,99 ---- static tstate_t ao_get_state PROTO((target_t *xp)); static int ao_get_lastsig PROTO((target_t *xp)); + static const siginfo_t *ao_get_lastsiginfo PROTO((target_t *xp)); static stopres_t ao_get_stopres PROTO((target_t *xp)); static int ao_read_fpval PROTO((target_t *xp, taddr_t addr, int num_bytes, *************** *** 213,217 **** ao_install_watchpoint, ao_uninstall_watchpoint, ao_is_attached, ao_detach, ao_get_addrsize, ! ao_get_state, ao_get_lastsig, ao_get_stopres, ao_get_sigstate, ao_get_stack_trace, ao_get_reg_addr, ao_get_signal_tag, ao_read_fpval, ao_read_fpreg, ao_readreg, ao_setreg, --- 214,219 ---- ao_install_watchpoint, ao_uninstall_watchpoint, ao_is_attached, ao_detach, ao_get_addrsize, ! ao_get_state, ao_get_lastsig, ao_get_lastsiginfo, ! ao_get_stopres, ao_get_sigstate, ao_get_stack_trace, ao_get_reg_addr, ao_get_signal_tag, ao_read_fpval, ao_read_fpreg, ao_readreg, ao_setreg, *************** *** 310,313 **** --- 312,316 ---- ip->ip_core = co; ip->ip_lastsig = lastsig; + ip->ip_lastsiginfo = NULL; ip->ip_base_sp = (taddr_t)~0; /* Fixed later for non-ELF */ *************** *** 499,502 **** --- 502,512 ---- } + static const siginfo_t * + ao_get_lastsiginfo(xp) + target_t *xp; + { + return GET_IPROC(xp)->ip_lastsiginfo; + } + /* Return the reason why the process stopped. This is the reason for the * most recent stop. Index: obj_signal.c =================================================================== RCS file: /cvsroot/ups/ups/ups/obj_signal.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** obj_signal.c 27 Nov 2002 15:39:08 -0000 1.4 --- obj_signal.c 13 Jul 2009 13:47:37 -0000 1.5 *************** *** 64,67 **** --- 64,68 ---- #define SGH_DFL_STOPS (1<<3) /* signal stops target by default */ #define SGH_DFL_IGNORE (1<<4) /* signal is ignored by default */ + #define SGH_ADDRESS (1<<5) /* signal has fault address */ static sig_info_t Sigtab[] = { *************** *** 69,73 **** { SIGHUP, "SIGHUP", SGH_CONT | SGH_ACCEPT }, { SIGQUIT, "SIGQUIT", 0 }, ! { SIGILL, "SIGILL", 0 }, { SIGTRAP, "SIGTRAP", 0 }, #if defined(SIGIOT) && (!defined(SIGABRT) || SIGIOT != SIGABRT) --- 70,74 ---- { SIGHUP, "SIGHUP", SGH_CONT | SGH_ACCEPT }, { SIGQUIT, "SIGQUIT", 0 }, ! { SIGILL, "SIGILL", SGH_ADDRESS }, { SIGTRAP, "SIGTRAP", 0 }, #if defined(SIGIOT) && (!defined(SIGABRT) || SIGIOT != SIGABRT) *************** *** 80,87 **** { SIGEMT, "SIGEMT", SGH_CONT | SGH_ACCEPT }, #endif ! { SIGFPE, "SIGFPE", SGH_CONT | SGH_ACCEPT }, { SIGKILL, "SIGKILL", SGH_CONT | SGH_ACCEPT }, ! { SIGBUS, "SIGBUS", 0 }, ! { SIGSEGV, "SIGSEGV", 0 }, #if defined (SIGSYS) { SIGSYS, "SIGSYS", 0 }, --- 81,88 ---- { SIGEMT, "SIGEMT", SGH_CONT | SGH_ACCEPT }, #endif ! { SIGFPE, "SIGFPE", SGH_CONT | SGH_ACCEPT | SGH_ADDRESS }, { SIGKILL, "SIGKILL", SGH_CONT | SGH_ACCEPT }, ! { SIGBUS, "SIGBUS", SGH_ADDRESS }, ! { SIGSEGV, "SIGSEGV", SGH_ADDRESS }, #if defined (SIGSYS) { SIGSYS, "SIGSYS", 0 }, *************** *** 286,291 **** const char * ! signame(sig) int sig; { static char buf[50]; --- 287,293 ---- const char * ! signame(sig, siginfo) int sig; + const siginfo_t *siginfo; { static char buf[50]; *************** *** 293,298 **** for (i = 0; i < SIGTAB_SIZE; ++i) { ! if (Sigtab[i].si_number == sig) ! return Sigtab[i].si_name; } --- 295,307 ---- for (i = 0; i < SIGTAB_SIZE; ++i) { ! if (Sigtab[i].si_number == sig) { ! if (siginfo && (Sigtab[i].si_attrs & SGH_ADDRESS) != 0) { ! sprintf(buf, "%s at 0x%lx", Sigtab[i].si_name, (taddr_t)siginfo->si_addr); ! return buf; ! } ! else { ! return Sigtab[i].si_name; ! } ! } } Index: obj_stack.c =================================================================== RCS file: /cvsroot/ups/ups/ups/obj_stack.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** obj_stack.c 20 Dec 2005 12:43:12 -0000 1.6 --- obj_stack.c 13 Jul 2009 13:47:37 -0000 1.7 *************** *** 355,359 **** new_object((objid_t)si, OT_FSIG, (objid_t)stk, OBJ_BEFORE); ! tag = xp_get_signal_tag(xp, si->si_signo); set_field_value((objid_t)si, FN_FSIG_SIGNAME, (fval_t)strsave(tag)); --- 355,359 ---- new_object((objid_t)si, OT_FSIG, (objid_t)stk, OBJ_BEFORE); ! tag = xp_get_signal_tag(xp, si->si_signo, NULL); set_field_value((objid_t)si, FN_FSIG_SIGNAME, (fval_t)strsave(tag)); *************** *** 363,369 **** lastsig = xp_get_lastsig(xp); if (last != NULL && lastsig != 0) { const char *tag; ! tag = xp_get_signal_tag(xp, lastsig); new_object((objid_t)tag, OT_FSIG, (objid_t)last, OBJ_AFTER); set_field_value((objid_t)tag, FN_FSIG_SIGNAME, --- 363,371 ---- lastsig = xp_get_lastsig(xp); if (last != NULL && lastsig != 0) { + const siginfo_t *lastsiginfo; const char *tag; ! lastsiginfo = xp_get_lastsiginfo(xp); ! tag = xp_get_signal_tag(xp, lastsig, lastsiginfo); new_object((objid_t)tag, OT_FSIG, (objid_t)last, OBJ_AFTER); set_field_value((objid_t)tag, FN_FSIG_SIGNAME, Index: ao_target.h =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_target.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ao_target.h 16 Feb 2004 13:02:00 -0000 1.3 --- ao_target.h 13 Jul 2009 13:47:37 -0000 1.4 *************** *** 50,53 **** --- 50,54 ---- taddr_t ip_restart_pc; bool ip_lastsig; + siginfo_t *ip_lastsiginfo; bool ip_attached; stopres_t ip_stopres; |
From: Tom H. <th...@us...> - 2009-07-08 11:53:33
|
Update of /cvsroot/ups/ups/ups In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv27313/ups Modified Files: ao_elfsym.c Log Message: Scan the symbol table in the debug object, not the main object. Index: ao_elfsym.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_elfsym.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** ao_elfsym.c 7 Jul 2009 15:42:44 -0000 1.15 --- ao_elfsym.c 8 Jul 2009 11:53:29 -0000 1.16 *************** *** 1026,1030 **** */ if (el->stripped) ! dwf_scan_symtab(st, NULL, NULL, &flist, p_mainfunc_name, dw_dbg); set_function_addresses(el, st, &flist); } else { --- 1026,1030 ---- */ if (el->stripped) ! dwf_scan_symtab(st, NULL, NULL, &flist, p_mainfunc_name, dw_debug_dbg); set_function_addresses(el, st, &flist); } else { |
Update of /cvsroot/ups/ups/ups In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5765 Modified Files: ao_aout.c ao_dwfsyms.c ao_dwftext.c ao_dwfutil.c ao_elfsym.c ao_syms.h ao_symscan.c ao_text.c ao_text.h Log Message: Use eh_frame data to unwind the stack if dwarf_frame does not exist. This also requires that we keep a libdwarf handle for the main object as well as the debug object when separate debug files are in use. Index: ao_dwftext.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwftext.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ao_dwftext.c 29 Jul 2008 15:12:50 -0000 1.10 --- ao_dwftext.c 7 Jul 2009 15:42:44 -0000 1.11 *************** *** 79,82 **** --- 79,83 ---- Dwarf_Error dw_err; dwarf_finish(AO_STDATA(st)->st_dw_dbg, &dw_err); + dwarf_finish(AO_STDATA(st)->st_dw_debug_dbg, &dw_err); ao_close_symtab_data(st); } *************** *** 136,140 **** func_t *flist; ! dwf_scan_symtab(st, NULL, NULL, &flist, NULL, ast->st_dw_dbg); return f; --- 137,141 ---- func_t *flist; ! dwf_scan_symtab(st, NULL, NULL, &flist, NULL, ast->st_dw_debug_dbg); return f; *************** *** 148,152 **** func_t *flist; ! dwf_scan_symtab(st, NULL, NULL, &flist, NULL, ast->st_dw_dbg); return st->st_sfiles; --- 149,153 ---- func_t *flist; ! dwf_scan_symtab(st, NULL, NULL, &flist, NULL, ast->st_dw_debug_dbg); return st->st_sfiles; *************** *** 392,397 **** ao_stdata_t *ast = AO_STDATA(st); taddr_t adjusted_pc = *pc - ast->st_dw_base_address; ! ! if (dwf_unwind(ast->st_dw_dbg, xp, fp, sp, &adjusted_pc, cfa)) { *pc = adjusted_pc; return TRUE; --- 393,402 ---- ao_stdata_t *ast = AO_STDATA(st); taddr_t adjusted_pc = *pc - ast->st_dw_base_address; ! taddr_t debug_adjusted_pc = *pc - ast->st_dw_debug_base_address; ! ! if (dwf_unwind(ast->st_dw_debug_dbg, xp, fp, sp, &debug_adjusted_pc, cfa)) { ! *pc = debug_adjusted_pc; ! return TRUE; ! } else if (dwf_unwind(ast->st_dw_dbg, xp, fp, sp, &adjusted_pc, cfa)) { *pc = adjusted_pc; return TRUE; Index: ao_dwfsyms.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwfsyms.c,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** ao_dwfsyms.c 7 Jul 2008 10:34:48 -0000 1.27 --- ao_dwfsyms.c 7 Jul 2009 15:42:44 -0000 1.28 *************** *** 1333,1337 **** * Start a new 'stf'. */ ! stf = make_stf(ap, cu_name, st, 0, lang, ast->st_dw_base_address); stf->stf_symlim = -1; stf->stf_fnum = -1; --- 1333,1337 ---- * Start a new 'stf'. */ ! stf = make_stf(ap, cu_name, st, 0, lang, ast->st_dw_debug_base_address); stf->stf_symlim = -1; stf->stf_fnum = -1; Index: ao_symscan.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_symscan.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ao_symscan.c 29 Jul 2008 14:25:10 -0000 1.10 --- ao_symscan.c 7 Jul 2009 15:42:44 -0000 1.11 *************** *** 2021,2024 **** --- 2021,2025 ---- #if WANT_DWARF ast->st_dw_base_address = ast->st_dw_base_address + delta; + ast->st_dw_debug_base_address = ast->st_dw_debug_base_address + delta; #endif } Index: ao_elfsym.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_elfsym.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ao_elfsym.c 26 Mar 2007 12:31:56 -0000 1.14 --- ao_elfsym.c 7 Jul 2009 15:42:44 -0000 1.15 *************** *** 970,973 **** --- 970,974 ---- symtab_type_t st_is; Dwarf_Debug dw_dbg; + Dwarf_Debug dw_debug_dbg; Dwarf_Error dw_err; int rv; *************** *** 981,985 **** #if WANT_DWARF if (st_is == ST_DWARF) { ! if ((rv = dwarf_init(el->debugel->fd, DW_DLC_READ, NULL, NULL, &dw_dbg, &dw_err) == DW_DLV_ERROR)) { dwf_fatal_error("dwarf_init", rv, NULL, dw_err); --- 982,986 ---- #if WANT_DWARF if (st_is == ST_DWARF) { ! if ((rv = dwarf_init(el->fd, DW_DLC_READ, NULL, NULL, &dw_dbg, &dw_err) == DW_DLV_ERROR)) { dwf_fatal_error("dwarf_init", rv, NULL, dw_err); *************** *** 987,990 **** --- 988,997 ---- return FALSE; } + if ((rv = dwarf_init(el->debugel->fd, DW_DLC_READ, NULL, NULL, + &dw_debug_dbg, &dw_err) == DW_DLV_ERROR)) { + dwf_fatal_error("dwarf_init", rv, NULL, dw_err); + free_elfinfo(el); + return FALSE; + } if (rv == DW_DLV_NO_ENTRY) { errf("Can't debug %s: no DWARF debugging information", *************** *** 1001,1005 **** mainfunc_name = NULL; p_mainfunc_name = (p_mainfunc != NULL) ? &mainfunc_name : NULL; ! if (!scan_ao_symtab(textpath, fd, &eibuf, dw_dbg, 0, st_is, &st, &flist, p_mainfunc_name)) { free_elfinfo(el); --- 1008,1012 ---- mainfunc_name = NULL; p_mainfunc_name = (p_mainfunc != NULL) ? &mainfunc_name : NULL; ! if (!scan_ao_symtab(textpath, fd, &eibuf, dw_dbg, dw_debug_dbg, 0, st_is, &st, &flist, p_mainfunc_name)) { free_elfinfo(el); Index: ao_syms.h =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_syms.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ao_syms.h 29 Jul 2008 14:24:32 -0000 1.8 --- ao_syms.h 7 Jul 2009 15:42:44 -0000 1.9 *************** *** 145,153 **** #if WANT_DWARF ! hashtab_t *st_type_names; /* Type name -> DIE. */ ! Dwarf_Debug st_dw_dbg; /* Handle for libdwarf calls */ ! bool st_dw_scanned; /* Dwarf symbols scanned? */ ! taddr_t st_dw_base_address; /* Addr shlib mapped rel to Dwarf sym addrs */ ! type_t *st_dw_void_type; /* Void type */ #endif --- 145,155 ---- #if WANT_DWARF ! hashtab_t *st_type_names; /* Type name -> DIE. */ ! Dwarf_Debug st_dw_dbg; /* Handle for libdwarf calls on main object */ ! Dwarf_Debug st_dw_debug_dbg; /* Handle for libdwarf calls on debug object */ ! bool st_dw_scanned; /* Dwarf symbols scanned? */ ! taddr_t st_dw_base_address; /* Addr main object mapped rel to Dwarf sym addrs */ ! taddr_t st_dw_debug_base_address; /* Addr debug object mapped rel to Dwarf sym addrs */ ! type_t *st_dw_void_type; /* Void type */ #endif Index: ao_text.h =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_text.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ao_text.h 29 Jul 2008 15:12:51 -0000 1.2 --- ao_text.h 7 Jul 2009 15:42:44 -0000 1.3 *************** *** 34,40 **** #ifdef AO_EXECINFO_H_INCLUDED bool scan_ao_symtab PROTO((const char *textpath, int fd, Execinfo *ei, ! Dwarf_Debug dw_dbg, taddr_t base_address, ! symtab_type_t st_is, symtab_t **p_symtab, ! func_t **p_flist, const char **p_mainfunc_name)); void do_ao_postscan_stuff PROTO((symtab_t *st, func_t *flist, Execinfo *ei, --- 34,41 ---- #ifdef AO_EXECINFO_H_INCLUDED bool scan_ao_symtab PROTO((const char *textpath, int fd, Execinfo *ei, ! Dwarf_Debug dw_dbg, Dwarf_Debug dw_debug_dbg, ! taddr_t base_address, symtab_type_t st_is, ! symtab_t **p_symtab, func_t **p_flist, ! const char **p_mainfunc_name)); void do_ao_postscan_stuff PROTO((symtab_t *st, func_t *flist, Execinfo *ei, Index: ao_aout.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_aout.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** ao_aout.c 26 Oct 2002 13:05:11 -0000 1.1.1.1 --- ao_aout.c 7 Jul 2009 15:42:44 -0000 1.2 *************** *** 301,305 **** p_mainfunc_name = (p_mainfunc != NULL) ? &mainfunc_name : NULL; ! if (!scan_ao_symtab(textpath, fd, &eibuf, NULL, shlib_load_addr, st_is, &st, &flist, p_mainfunc_name)) { return FALSE; --- 301,305 ---- p_mainfunc_name = (p_mainfunc != NULL) ? &mainfunc_name : NULL; ! if (!scan_ao_symtab(textpath, fd, &eibuf, NULL, NULL, shlib_load_addr, st_is, &st, &flist, p_mainfunc_name)) { return FALSE; Index: ao_text.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_text.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ao_text.c 29 Jul 2008 15:12:51 -0000 1.13 --- ao_text.c 7 Jul 2009 15:42:44 -0000 1.14 *************** *** 163,167 **** bool ! scan_ao_symtab(textpath, fd, ei, dw_dbg, base_address, st_is, p_symtab, p_flist, p_mainfunc_name) const char *textpath; --- 163,167 ---- bool ! scan_ao_symtab(textpath, fd, ei, dw_dbg, dw_debug_dbg, base_address, st_is, p_symtab, p_flist, p_mainfunc_name) const char *textpath; *************** *** 169,172 **** --- 169,173 ---- Execinfo *ei; Dwarf_Debug dw_dbg; + Dwarf_Debug dw_debug_dbg; taddr_t base_address; symtab_type_t st_is; *************** *** 254,262 **** ast->st_type_names = NULL; ast->st_dw_dbg = 0; ast->st_dw_scanned = FALSE; ! ast->st_dw_base_address = base_address + ei->debug_addr_delta; ast->st_dw_void_type = NULL; if (st_is == ST_DWARF) { ast->st_dw_dbg = dw_dbg; st = make_symtab(ap, textpath, (fil_t *)NULL, (func_t *)NULL, &dwarf_ops, (char *)ast); --- 255,266 ---- ast->st_type_names = NULL; ast->st_dw_dbg = 0; + ast->st_dw_debug_dbg = 0; ast->st_dw_scanned = FALSE; ! ast->st_dw_base_address = base_address; ! ast->st_dw_debug_base_address = base_address + ei->debug_addr_delta; ast->st_dw_void_type = NULL; if (st_is == ST_DWARF) { ast->st_dw_dbg = dw_dbg; + ast->st_dw_debug_dbg = dw_debug_dbg; st = make_symtab(ap, textpath, (fil_t *)NULL, (func_t *)NULL, &dwarf_ops, (char *)ast); Index: ao_dwfutil.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwfutil.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ao_dwfutil.c 29 Jul 2008 15:16:10 -0000 1.17 --- ao_dwfutil.c 7 Jul 2009 15:42:44 -0000 1.18 *************** *** 689,693 **** } ! if ((rv = dwarf_get_fde_list(dbg, &cie_data, &cie_count, &fde_data, &fde_count, &err)) == DW_DLV_OK) { Dwarf_Fde fde; --- 689,694 ---- } ! if ((rv = dwarf_get_fde_list(dbg, &cie_data, &cie_count, &fde_data, &fde_count, &err)) == DW_DLV_OK || ! (rv = dwarf_get_fde_list_eh(dbg, &cie_data, &cie_count, &fde_data, &fde_count, &err)) == DW_DLV_OK) { Dwarf_Fde fde; |
From: Tom H. <th...@us...> - 2009-07-07 14:39:19
|
Update of /cvsroot/ups/ups/lib/libdwarf/cmplrs In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv24251/cmplrs Modified Files: dwarf_addr_finder.h Log Message: Update to 20090622 release of libdwarf. |
From: Tom H. <th...@us...> - 2009-06-26 14:39:33
|
Update of /cvsroot/ups/ups/ups In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv26702/ups Modified Files: ci_lex.c Log Message: Rename getline to get_line to avoid conflict with system headers. Index: ci_lex.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ci_lex.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ci_lex.c 4 Nov 2002 14:56:20 -0000 1.2 --- ci_lex.c 26 Jun 2009 14:39:29 -0000 1.3 *************** *** 77,81 **** static int get_float_constant PROTO((lex_env_t *le, const char *line, const char **p_end, constant_t **p_co)); ! static const char *getline PROTO((lex_env_t *le)); static int get_string PROTO((lex_env_t *le, const char *line, string_const_t *sc)); static bool is_aggr_type_specifier PROTO((token_t token)); --- 77,81 ---- static int get_float_constant PROTO((lex_env_t *le, const char *line, const char **p_end, constant_t **p_co)); ! static const char *get_line PROTO((lex_env_t *le)); static int get_string PROTO((lex_env_t *le, const char *line, string_const_t *sc)); static bool is_aggr_type_specifier PROTO((token_t token)); *************** *** 382,386 **** static const char * ! getline(le) lex_env_t *le; { --- 382,386 ---- static const char * ! get_line(le) lex_env_t *le; { *************** *** 417,421 **** break; ! if ((line = getline(le)) == NULL) break; #ifdef DEBUG --- 417,421 ---- break; ! if ((line = get_line(le)) == NULL) break; #ifdef DEBUG *************** *** 1129,1133 **** ch = *line; else if (*++line == '\n') { ! line = getline(le); ch = (line != NULL) ? *line : '\0'; } --- 1129,1133 ---- ch = *line; else if (*++line == '\n') { ! line = get_line(le); ch = (line != NULL) ? *line : '\0'; } |
From: Tom H. <th...@us...> - 2009-06-26 14:30:30
|
Update of /cvsroot/ups/ups/ups In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25655/ups Modified Files: cc.c Log Message: Rename getline to cc_getline to avoid clash with system headers. Index: cc.c =================================================================== RCS file: /cvsroot/ups/ups/ups/cc.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** cc.c 4 Nov 2002 14:56:19 -0000 1.2 --- cc.c 26 Jun 2009 14:30:26 -0000 1.3 *************** *** 42,46 **** #include "cc.h" ! static const char *getline PROTO((char *arg)); static parse_id_t parse PROTO((const char *name, const char *cppflags, unsigned long parse_flags)); --- 42,46 ---- #include "cc.h" ! static const char *cc_getline PROTO((char *arg)); static parse_id_t parse PROTO((const char *name, const char *cppflags, unsigned long parse_flags)); *************** *** 305,309 **** static const char * ! getline(arg) char *arg; { --- 305,309 ---- static const char * ! cc_getline(arg) char *arg; { *************** *** 370,374 **** parse_flags, cc_report_error, (ci_resolve_name_func_t)NULL, ! getline, (char *)fp); pclose(fp); } --- 370,374 ---- parse_flags, cc_report_error, (ci_resolve_name_func_t)NULL, ! cc_getline, (char *)fp); pclose(fp); } *************** *** 379,383 **** parse_flags, cc_report_error, (ci_resolve_name_func_t)NULL, ! getline, (char *)fp); fclose(fp); } --- 379,383 ---- parse_flags, cc_report_error, (ci_resolve_name_func_t)NULL, ! cc_getline, (char *)fp); fclose(fp); } |
From: Tom H. <th...@us...> - 2009-06-26 10:48:15
|
Update of /cvsroot/ups/ups/ups In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv26595/ups Modified Files: tdr.c Log Message: Rename getline() to r_getline() to avoid conflict with system headers. Index: tdr.c =================================================================== RCS file: /cvsroot/ups/ups/ups/tdr.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** tdr.c 26 Oct 2002 13:05:57 -0000 1.1.1.1 --- tdr.c 26 Jun 2009 10:48:11 -0000 1.2 *************** *** 183,187 **** static int record_obj_dump PROTO((objid_t obj)); static int r_flush PROTO((void)); ! static int getline PROTO((bool lose_leading_whitespace, char **p_line)); static int cf_refresh PROTO((const char *cmd, int argc, char **unused_args)); --- 183,187 ---- static int record_obj_dump PROTO((objid_t obj)); static int r_flush PROTO((void)); ! static int r_getline PROTO((bool lose_leading_whitespace, char **p_line)); static int cf_refresh PROTO((const char *cmd, int argc, char **unused_args)); *************** *** 895,899 **** bool cond_holds; ! if (getline(FALSE, &line) != 0) return -1; --- 895,899 ---- bool cond_holds; ! if (r_getline(FALSE, &line) != 0) return -1; *************** *** 997,1001 **** char *line; ! while (getline(TRUE, &line) == 0) { if (strcmp(line, word) == 0) return 0; --- 997,1001 ---- char *line; ! while (r_getline(TRUE, &line) == 0) { if (strcmp(line, word) == 0) return 0; *************** *** 1012,1021 **** char *shell_line, *linecopy, *file_line; ! /* The line to be checked came from fpgetline() and getline() * also calls fpgetline(), so stash the line. */ linecopy = shell_line = strsave(line); ! if (getline(TRUE, &file_line) != 0) return -1; --- 1012,1021 ---- char *shell_line, *linecopy, *file_line; ! /* The line to be checked came from fpgetline() and r_getline() * also calls fpgetline(), so stash the line. */ linecopy = shell_line = strsave(line); ! if (r_getline(TRUE, &file_line) != 0) return -1; *************** *** 1096,1100 **** if (expect_output && res == 0) { ! if (getline(TRUE, &line) != 0) res = -1; else if (strcmp(line, "endshell") != 0) { --- 1096,1100 ---- if (expect_output && res == 0) { ! if (r_getline(TRUE, &line) != 0) res = -1; else if (strcmp(line, "endshell") != 0) { *************** *** 2169,2173 **** found_endcode = FALSE; ! while (getline(FALSE, &line) == 0) { if (strcmp(line, "endcode") == 0) { found_endcode = TRUE; --- 2169,2173 ---- found_endcode = FALSE; ! while (r_getline(FALSE, &line) == 0) { if (strcmp(line, "endcode") == 0) { found_endcode = TRUE; *************** *** 2717,2721 **** size_t len; ! if (getline(TRUE, &line) != 0) return -1; --- 2717,2721 ---- size_t len; ! if (r_getline(TRUE, &line) != 0) return -1; *************** *** 2726,2730 **** while (*line == '\0' || *line == '#' || strncmp(line, "version ", 8) == 0) { ! if (getline(TRUE, &line) != 0) return -1; } --- 2726,2730 ---- while (*line == '\0' || *line == '#' || strncmp(line, "version ", 8) == 0) { ! if (r_getline(TRUE, &line) != 0) return -1; } *************** *** 2775,2779 **** static int ! getline(lose_leading_whitespace, p_line) bool lose_leading_whitespace; char **p_line; --- 2775,2779 ---- static int ! r_getline(lose_leading_whitespace, p_line) bool lose_leading_whitespace; char **p_line; *************** *** 2844,2848 **** } ! if (getline(FALSE, &line) != 0) break; --- 2844,2848 ---- } ! if (r_getline(FALSE, &line) != 0) break; *************** *** 2895,2899 **** quit = FALSE; for (;;) { ! if (getline(FALSE, &line) != 0) break; --- 2895,2899 ---- quit = FALSE; for (;;) { ! if (r_getline(FALSE, &line) != 0) break; |
From: Tom H. <th...@us...> - 2009-03-23 10:01:01
|
Update of /cvsroot/ups/ups/lib/libx11wn In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22377 Modified Files: wn_init.c Log Message: Try /usr/share/X11/app-defaults as the first place to look for resource files as that is where modern versions of X put them. Index: wn_init.c =================================================================== RCS file: /cvsroot/ups/ups/lib/libx11wn/wn_init.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wn_init.c 15 Jul 2003 14:12:00 -0000 1.3 --- wn_init.c 23 Mar 2009 10:00:47 -0000 1.4 *************** *** 257,261 **** /* Get the defaults from the standard location. */ ! sprintf(path, "/usr/X11R6/lib/X11/app-defaults/%s", Appclass); if (access (path, F_OK) != 0) sprintf(path, "/usr/lib/X11/app-defaults/%s", Appclass); --- 257,263 ---- /* Get the defaults from the standard location. */ ! sprintf(path, "/usr/share/X11/app-defaults/%s", Appclass); ! if (access (path, F_OK) != 0) ! sprintf(path, "/usr/X11R6/lib/X11/app-defaults/%s", Appclass); if (access (path, F_OK) != 0) sprintf(path, "/usr/lib/X11/app-defaults/%s", Appclass); |
From: Tom H. <th...@us...> - 2009-03-20 16:42:25
|
Update of /cvsroot/ups/ups/lib/libx11wn In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20176 Modified Files: wn_event.c Log Message: Ignore events with a type of zero - this means the event was not addressed to any of our windows and hence none of the details will have been filled in by get_event. Index: wn_event.c =================================================================== RCS file: /cvsroot/ups/ups/lib/libx11wn/wn_event.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** wn_event.c 27 Oct 2008 10:06:05 -0000 1.7 --- wn_event.c 20 Mar 2009 16:42:13 -0000 1.8 *************** *** 1038,1042 **** get_event(wn, ev, &xyset); } ! w = WN_TO_W(ev->ev_wn); bw = w->w_bw; --- 1038,1045 ---- get_event(wn, ev, &xyset); } ! ! if (ev->ev_type == 0) ! continue; ! w = WN_TO_W(ev->ev_wn); bw = w->w_bw; |
From: Tom H. <th...@us...> - 2008-10-27 12:16:39
|
Update of /cvsroot/ups/ups/lib/libx11wn In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21248 Modified Files: wn_event.c Log Message: Make the handling of dummy key event used as a sentinel in the event queue more robust by making get_event detect it. Previously the event we peeked might be skipped by get_event as not being wanted which would then lead to get_event processing the dummy key press so that it was never seen by wn_expose_or_press_queued. Index: wn_event.c =================================================================== RCS file: /cvsroot/ups/ups/lib/libx11wn/wn_event.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** wn_event.c 22 Oct 2008 13:33:55 -0000 1.6 --- wn_event.c 27 Oct 2008 10:06:05 -0000 1.7 *************** *** 78,82 **** typedef void (*Sigfunc)PROTO((int)); ! static void get_event PROTO((int wn, event_t *ev, int *p_xyset)); static int select_on_mask PROTO((long win_mask, int sample, long *p_resmask)); static void set_event_win PROTO((event_t *ev)); --- 78,82 ---- typedef void (*Sigfunc)PROTO((int)); ! static int get_event PROTO((int wn, event_t *ev, int *p_xyset)); static int select_on_mask PROTO((long win_mask, int sample, long *p_resmask)); static void set_event_win PROTO((event_t *ev)); *************** *** 524,528 **** /* x_get_event() */ ! static void get_event(wn, ev, p_xyset) int wn; --- 524,528 ---- /* x_get_event() */ ! static int get_event(wn, ev, p_xyset) int wn; *************** *** 561,565 **** ev->ev_wn = w->w_wn; ev->ev_buttons = w->w_bw->bw_buttons; ! return; } if (ev->ev_type != EV_OTHER) { --- 561,565 ---- ev->ev_wn = w->w_wn; ev->ev_buttons = w->w_bw->bw_buttons; ! return TRUE; } if (ev->ev_type != EV_OTHER) { *************** *** 568,572 **** if (ev->ev_type == EV_OTHER_INPUT) ev->ev_fdmask = resmask; ! return; } } --- 568,572 ---- if (ev->ev_type == EV_OTHER_INPUT) ev->ev_fdmask = resmask; ! return TRUE; } } *************** *** 576,580 **** ev->ev_wn = w->w_wn; ev->ev_buttons = w->w_bw->bw_buttons; ! return; } } --- 576,580 ---- ev->ev_wn = w->w_wn; ev->ev_buttons = w->w_bw->bw_buttons; ! return TRUE; } } *************** *** 606,610 **** if (wp == _wn_Windowtab + _wn_Nwin) { ev->ev_type = 0; ! return; } --- 606,610 ---- if (wp == _wn_Windowtab + _wn_Nwin) { ev->ev_type = 0; ! return TRUE; } *************** *** 613,616 **** --- 613,626 ---- } + /* If this is a dummy key press event sent by us to prevent + * blocking then exit now indicating that we've run out of + * events to process. + */ + if (x_event.type == KeyPress && + x_event.xkey.send_event && + x_event.xkey.keycode == 0) { + return FALSE; + } + ev->ev_wn = w->w_wn; ev->ev_buttons = w->w_bw->bw_buttons; *************** *** 634,638 **** ev->ev_type = EV_OTHER; ! return; } switch(x_event.type) { --- 644,648 ---- ev->ev_type = EV_OTHER; ! return TRUE; } switch(x_event.type) { *************** *** 821,824 **** --- 831,836 ---- ev->ev_type = EV_OTHER; } + + return TRUE; } *************** *** 1375,1379 **** { #ifdef X11 - XEvent x_event; XKeyEvent ev; swin_t *w; --- 1387,1390 ---- *************** *** 1389,1411 **** ev.window = WN_TO_W(wn)->w_win; XSendEvent(wn__Dpy, ev.window, False, 0L, (XEvent *)&ev); *exposed = *resized = 0; ! for(;;) { - XPeekEvent(wn__Dpy, &x_event); - if (x_event.type == ButtonPress) - { - w = WN_TO_W(wn); - x = x_event.xbutton.x - w->w_x_offs; - y = x_event.xbutton.y - w->w_y_offs; - if (Mgetmd(x, y, wn) == md) - { - *p_x = x; - *p_y = y; - ret = 1; - } - } - /* read all events till we get the send event at the end */ - get_event(wn, &event, &xyset); if (event.ev_type == EV_WINDOW_EXPOSED || event.ev_type == EV_WINDOW_RESIZED) { if (!*exposed && !*resized) { --- 1400,1409 ---- ev.window = WN_TO_W(wn)->w_win; XSendEvent(wn__Dpy, ev.window, False, 0L, (XEvent *)&ev); + XFlush(wn__Dpy); *exposed = *resized = 0; ! /* read all events till we get the send event at the end */ ! while (get_event(wn, &event, &xyset)) { if (event.ev_type == EV_WINDOW_EXPOSED || event.ev_type == EV_WINDOW_RESIZED) { if (!*exposed && !*resized) { *************** *** 1418,1422 **** int x2pos = *e_x + *e_w; int y2pos = *e_y + *e_h; ! *e_x = MIN(*e_x, event.ev_xpos); *e_y = MIN(*e_y, event.ev_ypos); --- 1416,1420 ---- int x2pos = *e_x + *e_w; int y2pos = *e_y + *e_h; ! *e_x = MIN(*e_x, event.ev_xpos); *e_y = MIN(*e_y, event.ev_ypos); *************** *** 1425,1441 **** } ! if (event.ev_type == EV_WINDOW_EXPOSED) ! *exposed = 1; ! if (event.ev_type == EV_WINDOW_RESIZED) ! *resized = 1; } - if (x_event.xany.send_event && - x_event.type == KeyPress && - x_event.xkey.keycode == 0) - return ret; } } #endif /* X11 */ ! return 0; } void --- 1423,1447 ---- } ! if (event.ev_type == EV_WINDOW_EXPOSED) ! *exposed = 1; ! if (event.ev_type == EV_WINDOW_RESIZED) ! *resized = 1; ! } ! else if (event.ev_type == EV_BUTTON_DOWN) { ! w = WN_TO_W(wn); ! x = event.ev_x - w->w_x_offs; ! y = event.ev_y - w->w_y_offs; ! ! if (Mgetmd(x, y, wn) == md) ! { ! *p_x = x; ! *p_y = y; ! ret = 1; ! } } } } #endif /* X11 */ ! return ret; } void |
From: Tom H. <th...@us...> - 2008-10-22 13:34:06
|
Update of /cvsroot/ups/ups/lib/libx11wn In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25436 Modified Files: wn_event.c Log Message: Make sure we send the fake event to the same window we are listening on. Index: wn_event.c =================================================================== RCS file: /cvsroot/ups/ups/lib/libx11wn/wn_event.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** wn_event.c 10 Jul 2008 15:58:00 -0000 1.5 --- wn_event.c 22 Oct 2008 13:33:55 -0000 1.6 *************** *** 1387,1391 **** ev.type = KeyPress; ev.display = wn__Dpy; ! ev.window = WN_TO_W(WN_STDWIN)->w_win; XSendEvent(wn__Dpy, ev.window, False, 0L, (XEvent *)&ev); *exposed = *resized = 0; --- 1387,1391 ---- ev.type = KeyPress; ev.display = wn__Dpy; ! ev.window = WN_TO_W(wn)->w_win; XSendEvent(wn__Dpy, ev.window, False, 0L, (XEvent *)&ev); *exposed = *resized = 0; *************** *** 1394,1398 **** { XPeekEvent(wn__Dpy, &x_event); ! if (x_event.type == ButtonPress) { w = WN_TO_W(wn); --- 1394,1398 ---- { XPeekEvent(wn__Dpy, &x_event); ! if (x_event.type == ButtonPress) { w = WN_TO_W(wn); |
From: Tom H. <th...@us...> - 2008-07-29 15:16:13
|
Update of /cvsroot/ups/ups/ups In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21904 Modified Files: ao_dwfutil.c Log Message: Free DWARF unwind structures properly. Index: ao_dwfutil.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwfutil.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ao_dwfutil.c 14 Feb 2007 14:59:48 -0000 1.16 --- ao_dwfutil.c 29 Jul 2008 15:16:10 -0000 1.17 *************** *** 688,708 **** panic("Unsupported address size"); } ! if ((rv = dwarf_get_fde_list(dbg, &cie_data, &cie_count, &fde_data, &fde_count, &err)) == DW_DLV_OK) { - Dwarf_Cie *ciep; - Dwarf_Fde *fdep; Dwarf_Fde fde; ! ! if ((rv = dwarf_get_fde_at_pc(fde_data, *pc, &fde, NULL, NULL, &err)) == DW_DLV_OK) { taddr_t new_fp; taddr_t new_sp; taddr_t new_pc; ! ! if (dwf_unwind_reg(fde, xp, *cfa, *fp, *sp, *pc, DW_FRAME_CFA_COL, cfa) && dwf_unwind_reg(fde, xp, *cfa, *fp, *sp, *pc, ra_col, &new_pc)) { if (!dwf_unwind_reg(fde, xp, *cfa, *fp, *sp, *pc, fp_col, &new_fp)) new_fp = 0; ! ! if (!dwf_unwind_reg(fde, xp, *cfa, *fp, *sp, *pc, sp_col, &new_sp)) new_sp = *cfa; --- 688,706 ---- panic("Unsupported address size"); } ! if ((rv = dwarf_get_fde_list(dbg, &cie_data, &cie_count, &fde_data, &fde_count, &err)) == DW_DLV_OK) { Dwarf_Fde fde; ! ! if ((rv = dwarf_get_fde_at_pc(fde_data, *pc, &fde, NULL, NULL, &err)) == DW_DLV_OK) { taddr_t new_fp; taddr_t new_sp; taddr_t new_pc; ! ! if (dwf_unwind_reg(fde, xp, *cfa, *fp, *sp, *pc, DW_FRAME_CFA_COL, cfa) && dwf_unwind_reg(fde, xp, *cfa, *fp, *sp, *pc, ra_col, &new_pc)) { if (!dwf_unwind_reg(fde, xp, *cfa, *fp, *sp, *pc, fp_col, &new_fp)) new_fp = 0; ! ! if (!dwf_unwind_reg(fde, xp, *cfa, *fp, *sp, *pc, sp_col, &new_sp)) new_sp = *cfa; *************** *** 713,724 **** } ! for (ciep = cie_data; ciep < cie_data + cie_count; ciep++) ! dwarf_dealloc(dbg, *ciep, DW_DLA_CIE); ! ! for (fdep = fde_data; fdep < fde_data + fde_count; fdep++) ! dwarf_dealloc(dbg, *fdep, DW_DLA_FDE); ! ! dwarf_dealloc(dbg, cie_data, DW_DLA_LIST); ! dwarf_dealloc(dbg, fde_data, DW_DLA_LIST); } --- 711,715 ---- } ! dwarf_fde_cie_list_dealloc(dbg, cie_data, cie_count, fde_data, fde_count); } |
From: Tom H. <th...@us...> - 2008-07-29 15:12:55
|
Update of /cvsroot/ups/ups/ups In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv20526 Modified Files: ao_dwftext.c ao_text.c ao_text.h Log Message: Close the old DWARF handle when reloading an object. Index: ao_dwftext.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwftext.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ao_dwftext.c 20 Dec 2005 12:43:12 -0000 1.9 --- ao_dwftext.c 29 Jul 2008 15:12:50 -0000 1.10 *************** *** 43,46 **** --- 43,47 ---- #include "ao_dwfutil.h" #include "ao_symcb.h" + #include "ao_text.h" #include "cursors.h" #include "ui.h" *************** *** 76,80 **** symtab_t *st; { ! /* Original probably OK to use */ } --- 77,83 ---- symtab_t *st; { ! Dwarf_Error dw_err; ! dwarf_finish(AO_STDATA(st)->st_dw_dbg, &dw_err); ! ao_close_symtab_data(st); } Index: ao_text.h =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_text.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** ao_text.h 26 Oct 2002 13:06:34 -0000 1.1.1.1 --- ao_text.h 29 Jul 2008 15:12:51 -0000 1.2 *************** *** 30,33 **** --- 30,34 ---- #ifdef SYMTAB_H_INCLUDED bool get_preamble PROTO((func_t *f, ao_preamble_t **p_pr)); + void ao_close_symtab_data PROTO((symtab_t *st)); #ifdef AO_EXECINFO_H_INCLUDED Index: ao_text.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_text.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ao_text.c 29 Jul 2008 14:29:23 -0000 1.12 --- ao_text.c 29 Jul 2008 15:12:51 -0000 1.13 *************** *** 79,83 **** static int ao_get_min_bpt_addr PROTO((func_t *f, taddr_t *p_addr)); - static void ao_close_symtab_data PROTO((symtab_t *st)); static const char *ao_disassemble_instruction PROTO((func_t *f, taddr_t addr, const char *text, --- 79,82 ---- *************** *** 215,219 **** ao_fil_may_have_matching_globals, ! ao_close_symtab_data, /* original OK */ dw_cblocks_match, --- 214,218 ---- ao_fil_may_have_matching_globals, ! dw_close_symtab_data, dw_cblocks_match, *************** *** 463,467 **** } ! static void ao_close_symtab_data(st) symtab_t *st; --- 462,466 ---- } ! void ao_close_symtab_data(st) symtab_t *st; *************** *** 469,472 **** --- 468,473 ---- close(AO_STDATA(st)->st_textfd); /* RGA */ close_symio(AO_STDATA(st)->st_text_symio); + #if WANT_DWARF + #endif } |
From: Tom H. <th...@us...> - 2008-07-29 14:29:28
|
Update of /cvsroot/ups/ups/ups In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv2289 Modified Files: ao_text.c Log Message: Index: ao_text.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_text.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ao_text.c 21 Feb 2005 16:38:18 -0000 1.11 --- ao_text.c 29 Jul 2008 14:29:23 -0000 1.12 *************** *** 257,260 **** --- 257,261 ---- ast->st_dw_scanned = FALSE; ast->st_dw_base_address = base_address + ei->debug_addr_delta; + ast->st_dw_void_type = NULL; if (st_is == ST_DWARF) { ast->st_dw_dbg = dw_dbg; |
From: Tom H. <th...@us...> - 2008-07-29 14:27:01
|
Update of /cvsroot/ups/ups/ups In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv1130 Modified Files: va_expr.c Log Message: Remove unused/duplicate variable declarations. Index: va_expr.c =================================================================== RCS file: /cvsroot/ups/ups/ups/va_expr.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** va_expr.c 21 Jun 2006 16:25:27 -0000 1.7 --- va_expr.c 29 Jul 2008 14:26:53 -0000 1.8 *************** *** 1424,1428 **** if (cr->cr_machine != NULL && cr->cr_parse_id != NULL) { - taddr_t fp, ap, jcfa, unk; ci_exec_result_t res; objid_t par; --- 1424,1427 ---- |
From: Tom H. <th...@us...> - 2008-07-29 14:25:13
|
Update of /cvsroot/ups/ups/ups In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv334 Modified Files: ao_symscan.c Log Message: When we don't run the demangler because the compiler isn't known make sure the copy of the name we make is allocated from the right pool. Index: ao_symscan.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_symscan.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ao_symscan.c 14 Feb 2007 14:59:51 -0000 1.9 --- ao_symscan.c 29 Jul 2008 14:25:10 -0000 1.10 *************** *** 2305,2309 **** ct = ao_compiler(fil, FALSE, CT_UNKNOWN); if (ct == CT_UNKNOWN) ! *ptr = strdup(name); else demangle_name(name, len, alloc_id, ptr, func, ct); --- 2305,2309 ---- ct = ao_compiler(fil, FALSE, CT_UNKNOWN); if (ct == CT_UNKNOWN) ! *ptr = alloc_strdup(alloc_id, name); else demangle_name(name, len, alloc_id, ptr, func, ct); |
From: Tom H. <th...@us...> - 2008-07-29 14:24:35
|
Update of /cvsroot/ups/ups/ups In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv314 Modified Files: ao_syms.h Log Message: Keep one void type for each symbol table so that it doesn't wind up being used after the pool it was allocated from has been freed. Index: ao_syms.h =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_syms.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ao_syms.h 14 Feb 2007 14:59:50 -0000 1.7 --- ao_syms.h 29 Jul 2008 14:24:32 -0000 1.8 *************** *** 149,152 **** --- 149,153 ---- bool st_dw_scanned; /* Dwarf symbols scanned? */ taddr_t st_dw_base_address; /* Addr shlib mapped rel to Dwarf sym addrs */ + type_t *st_dw_void_type; /* Void type */ #endif |
From: Tom H. <th...@us...> - 2008-07-29 14:22:53
|
Update of /cvsroot/ups/ups/ups In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31953 Modified Files: ao_dwftype.c Log Message: Keep one void type for each symbol table so that it doesn't wind up being used after the pool it was allocated from has been freed. Index: ao_dwftype.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwftype.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ao_dwftype.c 14 Feb 2007 14:59:46 -0000 1.14 --- ao_dwftype.c 29 Jul 2008 14:22:47 -0000 1.15 *************** *** 56,60 **** dwf_type_from_dtype PROTO((dtype_t *dt)); static type_t * ! dwf_get_void_type PROTO((alloc_pool_t *ap)); static type_t * dwf_try_resolve_base_type PROTO((Dwarf_Debug dbg, Dwarf_Die die, --- 56,60 ---- dwf_type_from_dtype PROTO((dtype_t *dt)); static type_t * ! dwf_get_void_type PROTO((alloc_pool_t *ap, symtab_t *st)); static type_t * dwf_try_resolve_base_type PROTO((Dwarf_Debug dbg, Dwarf_Die die, *************** *** 556,570 **** * DW_TAG_pointer_type with no base type, implying 'void' */ ! static type_t *dwf_get_void_type(ap) alloc_pool_t *ap; { ! static type_t *void_type = NULL; ! ! if (void_type == NULL) { ! void_type = ci_make_type(ap, TY_VOID); ! void_type->ty_size = 0; ! void_type->ty_name = "void"; } ! return void_type; } --- 556,570 ---- * DW_TAG_pointer_type with no base type, implying 'void' */ ! static type_t *dwf_get_void_type(ap, st) alloc_pool_t *ap; + symtab_t *st; { ! ao_stdata_t *ast = AO_STDATA(st); ! if (ast->st_dw_void_type == NULL) { ! ast->st_dw_void_type = ci_make_type(ap, TY_VOID); ! ast->st_dw_void_type->ty_size = 0; ! ast->st_dw_void_type->ty_name = "void"; } ! return ast->st_dw_void_type; } *************** *** 643,647 **** * If there is no DW_AT_type attribute this is a "void *" or similar. */ ! *(dt->dt_p_type) = dwf_get_void_type(ap); } return base; --- 643,647 ---- * If there is no DW_AT_type attribute this is a "void *" or similar. */ ! *(dt->dt_p_type) = dwf_get_void_type(ap, stf->stf_symtab); } return base; *************** *** 816,820 **** * A declaration without a type - assume a typedef of 'void'. */ ! type->ty_base = dwf_get_void_type(ap); } else { /* --- 816,820 ---- * A declaration without a type - assume a typedef of 'void'. */ ! type->ty_base = dwf_get_void_type(ap, stf->stf_symtab); } else { /* |
From: Tom H. <th...@us...> - 2008-07-15 14:26:05
|
Update of /cvsroot/ups/ups/ups In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10912 Modified Files: config.c Log Message: Fix valgrind errors reading config file. Index: config.c =================================================================== RCS file: /cvsroot/ups/ups/ups/config.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** config.c 16 Feb 2004 13:02:00 -0000 1.4 --- config.c 15 Jul 2008 14:25:55 -0000 1.5 *************** *** 268,275 **** args2 = &fields3[0]; for (nargs2 = 0; args2[nargs2] != NULL; ++nargs2); ! args = (char **)e_malloc((nargs1 + nargs2) * sizeof(char *)); args[0] = fields[1]; ! for (i = 1; i < nargs1 + nargs2; ++i) args[i] = fields3[i-1]; } else --- 268,276 ---- args2 = &fields3[0]; for (nargs2 = 0; args2[nargs2] != NULL; ++nargs2); ! args = (char **)e_malloc((2 + nargs2) * sizeof(char *)); args[0] = fields[1]; ! for (i = 1; i <= nargs2; ++i) args[i] = fields3[i-1]; + args[nargs2+1] = NULL; } else |
From: Tom H. <th...@us...> - 2008-07-10 15:58:46
|
Update of /cvsroot/ups/ups/ups In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv23389 Modified Files: st_lookup.c Log Message: Fix uninitialised memory read while expanding macros. Index: st_lookup.c =================================================================== RCS file: /cvsroot/ups/ups/ups/st_lookup.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** st_lookup.c 21 Feb 2004 17:00:01 -0000 1.6 --- st_lookup.c 10 Jul 2008 15:58:40 -0000 1.7 *************** *** 109,119 **** static void dupf_mesg PROTO((const char *name, global_list_t *gl1, global_list_t *gl2)); ! static bool modname_matches PROTO((Module *m, const char *name, size_t namelen)); ! static void add_func_to_global_list PROTO((global_list_t **p_glhead, func_t *f, Module *module, const char *st_name, bool use_demangled_name)); ! static void add_to_global_list PROTO((global_list_t **p_glhead, ! const char *name, taddr_t addr, fil_t *fil, Module *module, const char *st_name)); --- 109,119 ---- static void dupf_mesg PROTO((const char *name, global_list_t *gl1, global_list_t *gl2)); ! static bool modname_matches PROTO((Module *m, const char *name, size_t namelen)); ! static void add_func_to_global_list PROTO((global_list_t **p_glhead, func_t *f, Module *module, const char *st_name, bool use_demangled_name)); ! static void add_to_global_list PROTO((global_list_t **p_glhead, ! const char *name, taddr_t addr, fil_t *fil, Module *module, const char *st_name)); *************** *** 200,204 **** if (name == NULL) return TRUE; ! modname = get_module_name(m); len = strlen(modname); --- 200,204 ---- if (name == NULL) return TRUE; ! modname = get_module_name(m); len = strlen(modname); *************** *** 249,253 **** *p_found_file = TRUE; ! for (fl = get_module_funclist(m); fl != NULL; --- 249,253 ---- *p_found_file = TRUE; ! for (fl = get_module_funclist(m); fl != NULL; *************** *** 279,283 **** if (fil) ! while (xp_next_symtab(xp, st, TRUE, &st)) for (*fil1 = st->st_sfiles; *fil1; *fil1 = (*fil1)->fi_next) { --- 279,283 ---- if (fil) ! while (xp_next_symtab(xp, st, TRUE, &st)) for (*fil1 = st->st_sfiles; *fil1; *fil1 = (*fil1)->fi_next) { *************** *** 337,341 **** xp = get_current_target(); st = NULL; ! while (xp_next_symtab(xp, st, TRUE, &st)) { fil_t *fil; --- 337,341 ---- xp = get_current_target(); st = NULL; ! while (xp_next_symtab(xp, st, TRUE, &st)) { fil_t *fil; *************** *** 444,448 **** } } ! free_global_list_list(glhead); --- 444,448 ---- } } ! free_global_list_list(glhead); *************** *** 474,481 **** xp_next_symtab(xp, st, !have_exact_match(*p_glhead, varname), &st)) { fil_t *fil; ! if (lookup_global_addr(st, varpat)) st_get_fi(st); ! for (fil = st->st_sfiles; fil != NULL && !wants_stop; fil = fil->fi_next) { --- 474,481 ---- xp_next_symtab(xp, st, !have_exact_match(*p_glhead, varname), &st)) { fil_t *fil; ! if (lookup_global_addr(st, varpat)) st_get_fi(st); ! for (fil = st->st_sfiles; fil != NULL && !wants_stop; fil = fil->fi_next) { *************** *** 514,518 **** xp_next_symtab(xp, st, !have_exact_match(*p_glhead, varname), &st)) { fil_t *fil; ! for (fil = st->st_sfiles; fil != NULL && !wants_stop; fil = fil->fi_next) { --- 514,518 ---- xp_next_symtab(xp, st, !have_exact_match(*p_glhead, varname), &st)) { fil_t *fil; ! for (fil = st->st_sfiles; fil != NULL && !wants_stop; fil = fil->fi_next) { *************** *** 647,651 **** global_and_cblist_to_var(st->st_cblist, name, f, p_cblock, &fil, &v); ! if (v != NULL) { add_var_to_global_list(p_glhead, v, fil, st->st_path); --- 647,651 ---- global_and_cblist_to_var(st->st_cblist, name, f, p_cblock, &fil, &v); ! if (v != NULL) { add_var_to_global_list(p_glhead, v, fil, st->st_path); *************** *** 663,670 **** if ((res = strcmp(gl1->gl_name, gl2->gl_name)) != 0) return res; ! if ((gl1->gl_func != NULL) != (gl2->gl_func != NULL)) return (gl1->gl_func == NULL) ? -1 : 1; ! if (gl1->gl_func == NULL) return 0; --- 663,670 ---- if ((res = strcmp(gl1->gl_name, gl2->gl_name)) != 0) return res; ! if ((gl1->gl_func != NULL) != (gl2->gl_func != NULL)) return (gl1->gl_func == NULL) ? -1 : 1; ! if (gl1->gl_func == NULL) return 0; *************** *** 673,677 **** if ((gl1->gl_module != NULL) == (gl2->gl_module != NULL)) return 0; ! return (gl1->gl_module != NULL) ? -1 : 1; } --- 673,677 ---- if ((gl1->gl_module != NULL) == (gl2->gl_module != NULL)) return 0; ! return (gl1->gl_module != NULL) ? -1 : 1; } *************** *** 686,690 **** { global_list_t *gl; ! for (gl = glhead; gl != NULL; gl = gl->gl_next) { if (strcmp(gl->gl_name, name) == 0) --- 686,690 ---- { global_list_t *gl; ! for (gl = glhead; gl != NULL; gl = gl->gl_next) { if (strcmp(gl->gl_name, name) == 0) *************** *** 765,769 **** update_target_menu_state(xp_get_state(xp), xp_is_attached(xp)); } ! int find_func_by_name(name, p_f, p_f1, use_demangled_name) --- 765,769 ---- update_target_menu_state(xp_get_state(xp), xp_is_attached(xp)); } ! int find_func_by_name(name, p_f, p_f1, use_demangled_name) *************** *** 778,782 **** (common_block_t **)NULL, (fil_t **)NULL, (fil_t **)NULL, use_demangled_name); ! } --- 778,782 ---- (common_block_t **)NULL, (fil_t **)NULL, (fil_t **)NULL, use_demangled_name); ! } *************** *** 816,820 **** if (p_fil1) *p_fil1 = NULL; ! if ((funcname = strchr(name, ':')) != NULL && funcname[1] != ':') { if (funcname[1] == '\0') { --- 816,820 ---- if (p_fil1) *p_fil1 = NULL; ! if ((funcname = strchr(name, ':')) != NULL && funcname[1] != ':') { if (funcname[1] == '\0') { *************** *** 822,828 **** return -1; } ! filename = name; ! filename_len = funcname - name; ++funcname; } --- 822,828 ---- return -1; } ! filename = name; ! filename_len = funcname - name; ++funcname; } *************** *** 846,850 **** break; } ! if (*s == '\0') { namecopy = strf("%s*", funcname); --- 846,850 ---- break; } ! if (*s == '\0') { namecopy = strf("%s*", funcname); *************** *** 873,877 **** if (cblock != NULL) { var_t *v; ! for (v = get_cblock_vars(cblock); v != NULL; v = v->va_next) { if (arg_match(v->va_name, funcpat)) { --- 873,877 ---- if (cblock != NULL) { var_t *v; ! for (v = get_cblock_vars(cblock); v != NULL; v = v->va_next) { if (arg_match(v->va_name, funcpat)) { *************** *** 881,885 **** } } ! if ((glhead == NULL) && (fil != NULL) && (filename == NULL)) { scan_symtabs(fil, (const char *)NULL, 0, funcpat, funcname, --- 881,885 ---- } } ! if ((glhead == NULL) && (fil != NULL) && (filename == NULL)) { scan_symtabs(fil, (const char *)NULL, 0, funcpat, funcname, *************** *** 947,951 **** (prev->gl_func != NULL) == (gl->gl_func != NULL)) continue; ! if (funcname_cmp(gl->gl_name, funcname) == 0) { if ((gl->gl_func != NULL) ? --- 947,951 ---- (prev->gl_func != NULL) == (gl->gl_func != NULL)) continue; ! if (funcname_cmp(gl->gl_name, funcname) == 0) { if ((gl->gl_func != NULL) ? *************** *** 987,991 **** if (exact_gls[0]->gl_fil && !exact_gls[1]->gl_fil) gl->gl_fil = exact_gls[0]->gl_fil; ! if (gl && !gl->gl_fil && partial_matches > 1 && partial_gls[0]->gl_func != NULL && --- 987,991 ---- if (exact_gls[0]->gl_fil && !exact_gls[1]->gl_fil) gl->gl_fil = exact_gls[0]->gl_fil; ! if (gl && !gl->gl_fil && partial_matches > 1 && partial_gls[0]->gl_func != NULL && *************** *** 1039,1043 **** else errf("\bUsing first one of multiple/overloaded symbols..."); ! for (gl = glhead; gl != NULL; gl = gl->gl_next) if (gl->gl_func && !(gl->gl_func->fu_flags & FU_STATIC)) break; --- 1039,1043 ---- else errf("\bUsing first one of multiple/overloaded symbols..."); ! for (gl = glhead; gl != NULL; gl = gl->gl_next) if (gl->gl_func && !(gl->gl_func->fu_flags & FU_STATIC)) break; *************** *** 1133,1137 **** char buff[256]; Outwin *ow; ! ow = get_or_create_outwin(); --- 1133,1137 ---- char buff[256]; Outwin *ow; ! ow = get_or_create_outwin(); *************** *** 1217,1226 **** xp = get_current_target(); st = NULL; ! while (xp_next_symtab(xp, st, TRUE, &st)) { if (addr_and_functab_to_func(st->st_functab, addr, &f)) return st_ensure_fu(f); } ! return NULL; } --- 1217,1226 ---- xp = get_current_target(); st = NULL; ! while (xp_next_symtab(xp, st, TRUE, &st)) { if (addr_and_functab_to_func(st->st_functab, addr, &f)) return st_ensure_fu(f); } ! return NULL; } *************** *** 1316,1320 **** { func_bp_list_t *fl; ! fl = new_func_bp_list(); fl->fl_func = f; --- 1316,1320 ---- { func_bp_list_t *fl; ! fl = new_func_bp_list(); fl->fl_func = f; *************** *** 1335,1339 **** if (arg_match(fl->fl_func->fu_demangled_name, funcpat)) { func_bp_list_t *fl2; ! fl2 = new_func_bp_list(); fl2->fl_func = f; --- 1335,1339 ---- if (arg_match(fl->fl_func->fu_demangled_name, funcpat)) { func_bp_list_t *fl2; ! fl2 = new_func_bp_list(); fl2->fl_func = f; *************** *** 1355,1362 **** if ((res = strcmp(fl1->fl_func->fu_demangled_name, fl2->fl_func->fu_demangled_name)) != 0) return res; ! if ((fl1->fl_func != NULL) != (fl2->fl_func != NULL)) return (fl1->fl_func == NULL) ? -1 : 1; ! if (fl1->fl_func == NULL) return 0; --- 1355,1362 ---- if ((res = strcmp(fl1->fl_func->fu_demangled_name, fl2->fl_func->fu_demangled_name)) != 0) return res; ! if ((fl1->fl_func != NULL) != (fl2->fl_func != NULL)) return (fl1->fl_func == NULL) ? -1 : 1; ! if (fl1->fl_func == NULL) return 0; *************** *** 1379,1385 **** func_bp_list_t *fl; target_t *xp; ! xp = get_current_target(); ! st = NULL; if ((funcname = strchr(name, ':')) != NULL && funcname[1] != ':') { --- 1379,1385 ---- func_bp_list_t *fl; target_t *xp; ! xp = get_current_target(); ! st = NULL; if ((funcname = strchr(name, ':')) != NULL && funcname[1] != ':') { *************** *** 1388,1392 **** return; } ! filename = name; filename_len = funcname - name; --- 1388,1392 ---- return; } ! filename = name; filename_len = funcname - name; *************** *** 1403,1407 **** funcname = (char *)name; } ! for (s = funcname; s != '\0'; ++s) { if (strchr(globchars, *s) != NULL) --- 1403,1407 ---- funcname = (char *)name; } ! for (s = funcname; s != '\0'; ++s) { if (strchr(globchars, *s) != NULL) *************** *** 1418,1435 **** globname = funcname; } ! funcpat = arg_do_quoting(&globname, globchars, TRUE); ! if (namecopy != NULL) free(namecopy); ! if (funcpat == NULL) return ; ! ! while (xp_next_symtab(xp, st, TRUE, &st)) find_matching_funcs_only(st, st->st_funclist, (fil_t *)NULL, filename, filename_len, funcpat, funchead, cmp_style); ! /* sort list so duplicates are together */ matches = 0; --- 1418,1435 ---- globname = funcname; } ! funcpat = arg_do_quoting(&globname, globchars, TRUE); ! if (namecopy != NULL) free(namecopy); ! if (funcpat == NULL) return ; ! ! while (xp_next_symtab(xp, st, TRUE, &st)) find_matching_funcs_only(st, st->st_funclist, (fil_t *)NULL, filename, filename_len, funcpat, funchead, cmp_style); ! /* sort list so duplicates are together */ matches = 0; *************** *** 1459,1463 **** static const char globchars[] = "*?"; const char *globname; ! funcname = (char *)name; globname = funcname; --- 1459,1463 ---- static const char globchars[] = "*?"; const char *globname; ! funcname = (char *)name; globname = funcname; *************** *** 1471,1475 **** oldstate = td_set_obj_updating(OBJ_UPDATING_OFF); clear_selection(); ! for (gl = glhead; gl != NULL; gl = gl->gl_next) { if (gl->gl_var) --- 1471,1475 ---- oldstate = td_set_obj_updating(OBJ_UPDATING_OFF); clear_selection(); ! for (gl = glhead; gl != NULL; gl = gl->gl_next) { if (gl->gl_var) *************** *** 1494,1498 **** const macro_t *ma; const macro_value_t *mav; ! for (ma = FI_MACROS(fil); ma != NULL; ma = ma->ma_next) if (strlen(ma->ma_name) == wl && memcmp(ma->ma_name, w, wl) == 0) --- 1494,1498 ---- const macro_t *ma; const macro_value_t *mav; ! for (ma = FI_MACROS(fil); ma != NULL; ma = ma->ma_next) if (strlen(ma->ma_name) == wl && memcmp(ma->ma_name, w, wl) == 0) *************** *** 1502,1506 **** (mav->mav_end_lnum == 0 || lnum <= mav->mav_end_lnum))) return mav->mav_value; ! return NULL; } --- 1502,1506 ---- (mav->mav_end_lnum == 0 || lnum <= mav->mav_end_lnum))) return mav->mav_value; ! return NULL; } *************** *** 1514,1518 **** bool expanded = TRUE; char *result = NULL; ! if (FI_MACROS(fil) == NULL) return NULL; --- 1514,1518 ---- bool expanded = TRUE; char *result = NULL; ! if (FI_MACROS(fil) == NULL) return NULL; *************** *** 1522,1529 **** expanded = FALSE; ! ! while (*ptr && !expanded) { while (*ptr && !isalpha(*ptr) && *ptr != '_') ptr++; ! if (*ptr) { const char *word = ptr++; --- 1522,1529 ---- expanded = FALSE; ! ! while (!expanded && *ptr) { while (*ptr && !isalpha(*ptr) && *ptr != '_') ptr++; ! if (*ptr) { const char *word = ptr++; *************** *** 1531,1538 **** while (isalnum(*ptr) || *ptr == '_') ptr++; ! if ((expansion = macro_expand_word(fil, lnum, word, ptr - word)) != NULL) { char *new = e_malloc(strlen(start) + strlen(expansion) - (ptr-word) + 1); ! memcpy(new, start, word - start); strcpy(new + (word - start), expansion); --- 1531,1538 ---- while (isalnum(*ptr) || *ptr == '_') ptr++; ! if ((expansion = macro_expand_word(fil, lnum, word, ptr - word)) != NULL) { char *new = e_malloc(strlen(start) + strlen(expansion) - (ptr-word) + 1); ! memcpy(new, start, word - start); strcpy(new + (word - start), expansion); |
From: Tom H. <th...@us...> - 2008-07-10 15:58:06
|
Update of /cvsroot/ups/ups/lib/libx11wn In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv22987 Modified Files: wn_event.c Log Message: Make sure get_event() always fills in a valid event type. Index: wn_event.c =================================================================== RCS file: /cvsroot/ups/ups/lib/libx11wn/wn_event.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wn_event.c 16 Nov 2007 17:02:55 -0000 1.4 --- wn_event.c 10 Jul 2008 15:58:00 -0000 1.5 *************** *** 784,788 **** } ! ev->ev_type = (nbytes > 0) ? EV_KEY : 0; ev->ev_time = xk->time; --- 784,788 ---- } ! ev->ev_type = (nbytes > 0) ? EV_KEY : EV_OTHER; ev->ev_time = xk->time; *************** *** 810,821 **** if (icon_notify_funct) (*icon_notify_funct)(w->w_wn,FALSE); break; case UnmapNotify: if (icon_notify_funct) (*icon_notify_funct)(w->w_wn,TRUE); break; default: ! ev->ev_type = 0; } } --- 810,823 ---- if (icon_notify_funct) (*icon_notify_funct)(w->w_wn,FALSE); + ev->ev_type = EV_OTHER; break; case UnmapNotify: if (icon_notify_funct) (*icon_notify_funct)(w->w_wn,TRUE); + ev->ev_type = EV_OTHER; break; default: ! ev->ev_type = EV_OTHER; } } |
From: Tom H. <th...@us...> - 2008-07-07 10:34:53
|
Update of /cvsroot/ups/ups/ups In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv14716/ups Modified Files: ao_dwfsyms.c Log Message: Cope with types that have no name. Index: ao_dwfsyms.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwfsyms.c,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** ao_dwfsyms.c 14 Feb 2007 14:59:46 -0000 1.26 --- ao_dwfsyms.c 7 Jul 2008 10:34:48 -0000 1.27 *************** *** 648,652 **** * Extract the infomation and make a type. */ - name = dwf_get_string(dbg, ap, die, DW_AT_name); nbytes = dwf_get_number(dbg, die, DW_AT_byte_size); typecode = dwf_get_typecode(dbg, die); --- 648,651 ---- *************** *** 654,658 **** type = ci_make_type(ap, typecode); type->ty_size = nbytes; ! type->ty_name = name; type->ty_lexinfo = dwf_make_lexinfo(dbg, die, ap, stf); --- 653,658 ---- type = ci_make_type(ap, typecode); type->ty_size = nbytes; ! if (dwf_has_attribute(dbg, die, DW_AT_name)) ! type->ty_name = dwf_get_string(dbg, ap, die, DW_AT_name); type->ty_lexinfo = dwf_make_lexinfo(dbg, die, ap, stf); |
From: Tom H. <th...@us...> - 2008-06-26 13:39:58
|
Update of /cvsroot/ups/ups/ups In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv349 Modified Files: ao_ptrace.c Log Message: When trying to execute to the start of main, ignore any stop caused by the solib loader breakpoint firing so that we really find main and not some random point in the dynamic linker. Also, call get_startup_stop_addrs() again after starting the process as the dynamic linker may not have loaded the shared objects where we expected, and if main() is in a shared object we may have the wrong address. Index: ao_ptrace.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_ptrace.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ao_ptrace.c 21 Jun 2006 16:34:37 -0000 1.11 --- ao_ptrace.c 26 Jun 2008 13:39:52 -0000 1.12 *************** *** 570,575 **** elf_update_dynamic_solibs(xp->xp_apool, xp->xp_textpath, &ip->ip_solibs, TRUE); #endif ! *p_stopres = xp_execto(xp, main_min_bpt_addr); #endif } --- 570,581 ---- elf_update_dynamic_solibs(xp->xp_apool, xp->xp_textpath, &ip->ip_solibs, TRUE); + if (get_startup_stop_addrs(xp, &main_addr, &main_min_bpt_addr) != 0) + return -1; #endif ! do ! { ! *p_stopres = xp_execto(xp, main_min_bpt_addr); ! } ! while (xp->xp_hit_solib_event); #endif } |
From: Tom H. <th...@us...> - 2007-11-22 15:37:32
|
Update of /cvsroot/ups/ups/ups In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv19083/ups Modified Files: obj_bpt.c Log Message: If a breakpoint is marked as need initialisation and it has references to functions in the breakpoint code then make sure we recompile the code in case the function has moved in memory. Index: obj_bpt.c =================================================================== RCS file: /cvsroot/ups/ups/ups/obj_bpt.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** obj_bpt.c 21 Jun 2006 16:25:27 -0000 1.6 --- obj_bpt.c 22 Nov 2007 15:37:28 -0000 1.7 *************** *** 1633,1636 **** --- 1633,1640 ---- if (bd->data_needs_initialising) { + if (bd->code_has_func_calls && bd->machine && bd->parse_id) { + ci_free_machine(bd->machine); + bd->machine = recompile_code(bd->parse_id, (char *)NULL); + } ci_initialise_machine(bd->machine, TRUE, FALSE, (char **)NULL, (char **)NULL); |