svn commit: r193838 - stable/6/lib/libthread_db

Attilio Rao attilio at FreeBSD.org
Tue Jun 9 15:20:37 UTC 2009


Author: attilio
Date: Tue Jun  9 15:20:36 2009
New Revision: 193838
URL: http://svn.freebsd.org/changeset/base/193838

Log:
  MFC r193826:
  avoid to write a int into a char * avoiding breakages on BE architectures.

Modified:
  stable/6/lib/libthread_db/libthr_db.c
  stable/6/lib/libthread_db/thread_db.h

Modified: stable/6/lib/libthread_db/libthr_db.c
==============================================================================
--- stable/6/lib/libthread_db/libthr_db.c	Tue Jun  9 15:18:01 2009	(r193837)
+++ stable/6/lib/libthread_db/libthr_db.c	Tue Jun  9 15:20:36 2009	(r193838)
@@ -458,6 +458,7 @@ pt_thr_get_info(const td_thrhandle_t *th
 	const td_thragent_t *ta = th->th_ta;
 	struct ptrace_lwpinfo linfo;
 	int state;
+	int traceme;
 	int ret;
 
 	TDBG_FUNC();
@@ -470,7 +471,8 @@ pt_thr_get_info(const td_thrhandle_t *th
 	if (ret != 0)
 		return (TD_ERR);
 	ret = thr_pread_int(ta, th->th_thread + ta->thread_off_report_events,
-	    &info->ti_traceme);
+	    &traceme);
+	info->ti_traceme = traceme;
 	if (ret != 0)
 		return (TD_ERR);
 	ret = ps_pread(ta->ph, th->th_thread + ta->thread_off_event_mask,

Modified: stable/6/lib/libthread_db/thread_db.h
==============================================================================
--- stable/6/lib/libthread_db/thread_db.h	Tue Jun  9 15:18:01 2009	(r193837)
+++ stable/6/lib/libthread_db/thread_db.h	Tue Jun  9 15:20:36 2009	(r193838)
@@ -184,7 +184,7 @@ typedef struct {
 	int		ti_pri;
 	lwpid_t		ti_lid;
 	char		ti_db_suspended;
-	int		ti_traceme;
+	char		ti_traceme;
 	sigset_t	ti_sigmask;
 	sigset_t	ti_pending;
 	psaddr_t	ti_tls;


More information about the svn-src-all mailing list