The NetBSD Project

CVS log for src/lib/libpthread_dbg/Attic/pthread_dbg.c

[BACK] Up to [cvs.NetBSD.org] / src / lib / libpthread_dbg

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.51.2.1, Fri Apr 21 16:53:12 2017 UTC (6 years, 11 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.51: +2 -2 lines
FILE REMOVED

Sync with HEAD

Revision 1.44.2.2, Mon Mar 20 06:57:00 2017 UTC (7 years ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.44.2.1: +2 -2 lines
FILE REMOVED

Sync with HEAD

Revision 1.52, Wed Feb 8 03:44:41 2017 UTC (7 years, 1 month ago) by kamil
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-socketcan-base1, HEAD
Changes since 1.51: +2 -2 lines
FILE REMOVED

libpthread_dbg(3) deletion from the base distribution

libpthread_dbg(3) is a remnant library from the M:N thread model
(pre-NetBSD-5.0) API to introspect threads within a process and for use
of debuggers.

Currently in the 1:1 model it's not used in GDB neither in LLDB and it's
not either planned to be used. It's current function to read pthread_t
structures is realizable within a regular debugger capable to
instrospect objects within a tracee (GDB, LLDB...).

Remaining users of this API can still use this library from
pkgsrc/devel/libpthread_dbg.

Sponsored by <The NetBSD Foundation>

Revision 1.44.2.1 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:04 2017 UTC (7 years, 2 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.44: +15 -14 lines
Diff to previous 1.44 (colored) to selected 1.15 (colored)

Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.51 / (download) - annotate - [select for diffs], Tue Nov 22 04:51:06 2016 UTC (7 years, 4 months ago) by kamil
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.50: +2 -4 lines
Diff to previous 1.50 (colored) to selected 1.15 (colored)

Obsolete thread_type in td_thread_info_st in <pthread_dbg.h>

The thread_type is irrelevant as all local POSIX threads are in user-space.

Keep the thread_type member in td_thread_info_st to preserve ABI
compatibility.

Later the remnants from M:N will be refactored in one go with library ABI
version bump.

Sponsored by <The NetBSD Foundation>

Revision 1.50 / (download) - annotate - [select for diffs], Tue Nov 22 04:17:05 2016 UTC (7 years, 4 months ago) by kamil
Branch: MAIN
Changes since 1.49: +3 -5 lines
Diff to previous 1.49 (colored) to selected 1.15 (colored)

Simplify (pthread_t)pt_magic read in td_map_pth2thr(3)

No functional change. All ATF tests for pthread_dbg(3) still pass.

Sponsored by <The NetBSD Foundation>

Revision 1.49 / (download) - annotate - [select for diffs], Mon Nov 21 03:02:34 2016 UTC (7 years, 4 months ago) by kamil
Branch: MAIN
Changes since 1.48: +7 -7 lines
Diff to previous 1.48 (colored) to selected 1.15 (colored)

Kill SA thread states (TD_STATE_*) in pthread_dbg and add TD_STATE_DEAD

Scheduler Activation types were removed in NetBSD 5.0. Old type set is not
matching the new world POSIX threads library.

Only TD_STATE_RUNNING, TD_STATE_ZOMBIE are still applicable - keep it.

Keep TD_STATE_UNKNOWN as generic unrecognized type.

Add new TD_STATE_DEAD one. The TD_STATE_DEAD type is represented by number
6 in the POSIX threads library, but for the sake of compatibility with
older software using pthread_dbg - renumber it to 7, as six was reserved
for TD_STATE_SUSPENDED.

Old removed state types are marked as reserved and unused.

Sponsored by <The NetBSD Foundation>

Revision 1.48 / (download) - annotate - [select for diffs], Sun Nov 20 21:49:24 2016 UTC (7 years, 4 months ago) by kamil
Branch: MAIN
Changes since 1.47: +5 -2 lines
Diff to previous 1.47 (colored) to selected 1.15 (colored)

Always set trailing '\0' in td_thr_getname() to compose valid ASCIIZ string

This fixes threads5 in tests/lib/libpthread_dbg

Sponsored by <The NetBSD Foundation>

Revision 1.47 / (download) - annotate - [select for diffs], Sun Nov 20 03:53:47 2016 UTC (7 years, 4 months ago) by kamil
Branch: MAIN
Changes since 1.46: +5 -3 lines
Diff to previous 1.46 (colored) to selected 1.15 (colored)

Fix pt_magic read in td_map_pth2thr()

The pt_magic field is not the first one in the pthread_t structure.

Sponsored by <The NetBSD Foundation>

Revision 1.46 / (download) - annotate - [select for diffs], Sun Nov 20 03:11:32 2016 UTC (7 years, 4 months ago) by kamil
Branch: MAIN
Changes since 1.45: +5 -5 lines
Diff to previous 1.45 (colored) to selected 1.15 (colored)

Catch up with correct pt_magic reads in td_thr_{getname,suspend,resume}

The pt_magic field is not the first one in the pthread_t structure.

Sponsored by <The NetBSD Foundation>

Revision 1.45 / (download) - annotate - [select for diffs], Sun Nov 20 02:27:56 2016 UTC (7 years, 4 months ago) by kamil
Branch: MAIN
Changes since 1.44: +3 -3 lines
Diff to previous 1.44 (colored) to selected 1.15 (colored)

Fix pt_magic (part of pthread_t) read in td_thr_info()

The pt_magic field is not the first one in the pthread_t structure.
After this fix, this code is confirmed to work and function td_thr_info()
is functional.

Sponsored by <The NetBSD Foundation>

Revision 1.44 / (download) - annotate - [select for diffs], Sat Jan 23 14:02:21 2016 UTC (8 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.43: +18 -29 lines
Diff to previous 1.43 (colored) to selected 1.15 (colored)

don't use kernel types.

Revision 1.42.8.1 / (download) - annotate - [select for diffs], Tue Nov 24 17:37:15 2015 UTC (8 years, 4 months ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored) next main 1.43 (colored) to selected 1.15 (colored)

Pull up following revision(s) (requested by manu in ticket #829):
	lib/libpthread_dbg/pthread_dbg.c: revision 1.43 (via patch)
	lib/libpthread/pthread_int.h: revision 1.91-1.92 (via patch)
	lib/libc/stdlib/jemalloc.c: revision 1.37-1.38
	lib/libpthread/pthread_tsd.c: revision 1.12-1.14 (via patch)
	include/limits.h: revision 1.34 (via patch)
	lib/libpthread/pthread.c: revision 1.146-1.147 (via patch)
	lib/libpthread/pthread_key_create.3: revision 1.7 (via patch)

libpthread:

Make PTHREAD_KEYS_MAX dynamically adjustable
NetBSD's PTHREAD_KEYS_MAX is set to 256, which is low compared to
other systems like Linux (1024) or MacOS X (512). As a result some
setups tested on Linux will exhibit problems on NetBSD because of
pthread_keys usage beyond the limit. This happens for instance on
Apache with various module loaded, and in this case no particular
developper can be blamed for going beyond the limit, since several
modules from different sources contribute to the problem.
This patch makes the limit conigurable through the PTHREAD_KEYS_MAX
environement variable. If undefined, the default remains unchanged
(256). In any case, the value cannot be lowered below POSIX-mandated
_POSIX_THREAD_KEYS_MAX (128).

While there:
- use EXIT_FAILURE instead of 1 when calling err(3) in libpthread.
- Reset _POSIX_THREAD_KEYS_MAX to POSIX mandated 128, instead of 256.

Fix previous: Can't use calloc/malloc before we complete initialization
of the thread library, because malloc uses pthread_foo_specific, and it will
end up initializing itself incorrectly.

Thanks rump for not letting us use even mmap during initialization.

libc/jemalloc:

Fix non _REENTRANT build.
Defer using pthread keys until we are threaded.
From Christos, fixes PR port-arm/50087 by allowing malloc calls prior
to libpthread initialization.

Revision 1.43 / (download) - annotate - [select for diffs], Fri May 29 07:37:32 2015 UTC (8 years, 10 months ago) by manu
Branch: MAIN
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored) to selected 1.15 (colored)

Make PTHREAD_KEYS_MAX dynamically adjustable

NetBSD's PTHREAD_KEYS_MAX is set to 256, which is low compared to
other systems like Linux (1024) or MacOS X (512). As a result some
setups tested on Linux will exhibit problems on NetBSD because of
pthread_keys usage beyond the limit. This happens for instance on
Apache with various module loaded, and in this case no particular
developper can be blamed for going beyond the limit, since several
modules from different sources contribute to the problem.

This patch makes the limit conigurable through the PTHREAD_KEYS_MAX
environement variable. If undefined, the default remains unchanged
(256). In any case, the value cannot be lowered below POSIX-mandated
_POSIX_THREAD_KEYS_MAX (128).

While there:
- use EXIT_FAILURE instead of 1 when calling err(3) in libpthread.
- Reset _POSIX_THREAD_KEYS_MAX to POSIX mandated 128, instead of 256.

Revision 1.40.28.1 / (download) - annotate - [select for diffs], Mon Feb 25 00:28:00 2013 UTC (11 years, 1 month ago) by tls
Branch: tls-maxphys
Changes since 1.40: +12 -17 lines
Diff to previous 1.40 (colored) next main 1.41 (colored) to selected 1.15 (colored)

resync with head

Revision 1.40.6.1 / (download) - annotate - [select for diffs], Wed Jan 23 00:05:26 2013 UTC (11 years, 2 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.40: +12 -17 lines
Diff to previous 1.40 (colored) next main 1.41 (colored) to selected 1.15 (colored)

sync with head

Revision 1.42 / (download) - annotate - [select for diffs], Sun Jan 20 18:45:19 2013 UTC (11 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9, yamt-pagecache-base8, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-7-base, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, agc-symver-base, agc-symver
Branch point for: netbsd-7
Changes since 1.41: +5 -14 lines
Diff to previous 1.41 (colored) to selected 1.15 (colored)

Only the first symbol (pthread_dbg) should return NOLIB, the rest indicate
internal inconsistencies, so let the code return a more vocal error.

Revision 1.41 / (download) - annotate - [select for diffs], Sun Jan 20 18:18:07 2013 UTC (11 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.40: +9 -5 lines
Diff to previous 1.40 (colored) to selected 1.15 (colored)

tsd_alloc is no more, use tsd_list, and disable the destructor walking code
since it needs work. Fixes gdb.

Revision 1.39.4.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:14:46 2008 UTC (16 years ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.39: +6 -5 lines
Diff to previous 1.39 (colored) next main 1.40 (colored) to selected 1.15 (colored)

sync with head.

Revision 1.37.2.2 / (download) - annotate - [select for diffs], Sun Mar 23 00:40:29 2008 UTC (16 years ago) by matt
Branch: matt-armv6
Changes since 1.37.2.1: +6 -5 lines
Diff to previous 1.37.2.1 (colored) to branchpoint 1.37 (colored) next main 1.38 (colored) to selected 1.15 (colored)

sync with HEAD

Revision 1.40 / (download) - annotate - [select for diffs], Fri Mar 7 22:27:07 2008 UTC (16 years ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, matt-premerge-20091211, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-premerge-20101231, matt-mips64-base2, matt-armv6-nbase, keiichi-mipv6-base, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend, hpcarm-cleanup-nbase, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: yamt-pagecache, tls-maxphys
Changes since 1.39: +6 -5 lines
Diff to previous 1.39 (colored) to selected 1.15 (colored)

pthread_key_create: instead of using a simple 1/0 value to record a key
as allocated, use an array of pointers and save __builtin_return_address(0)
so keys can be identified when doing post-mortem debugging.

Revision 1.37.2.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:11:48 2007 UTC (16 years, 4 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.37: +15 -492 lines
Diff to previous 1.37 (colored) to selected 1.15 (colored)

sync with HEAD

Revision 1.39 / (download) - annotate - [select for diffs], Tue Oct 16 15:06:11 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: matt-armv6-base, hpcarm-cleanup-base, cube-autoconf-base, cube-autoconf
Branch point for: keiichi-mipv6
Changes since 1.38: +14 -492 lines
Diff to previous 1.38 (colored) to selected 1.15 (colored)

Remove stuff that is no longer useful.

Revision 1.38 / (download) - annotate - [select for diffs], Mon Sep 10 11:34:06 2007 UTC (16 years, 6 months ago) by skrll
Branch: MAIN
Changes since 1.37: +5 -4 lines
Diff to previous 1.37 (colored) to selected 1.15 (colored)

Merge nick-csl-alignment.

Revision 1.35.2.3 / (download) - annotate - [select for diffs], Mon Sep 3 10:14:17 2007 UTC (16 years, 6 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.35.2.2: +4 -16 lines
Diff to previous 1.35.2.2 (colored) to branchpoint 1.35 (colored) next main 1.36 (colored) to selected 1.15 (colored)

Sync with HEAD.

Revision 1.37 / (download) - annotate - [select for diffs], Thu Aug 16 01:09:50 2007 UTC (16 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base5, nick-csl-alignment-base4, nick-csl-alignment-base3
Branch point for: matt-armv6
Changes since 1.36: +4 -16 lines
Diff to previous 1.36 (colored) to selected 1.15 (colored)

Catch up with libpthread changes.

Revision 1.35.2.2 / (download) - annotate - [select for diffs], Wed Aug 15 13:46:54 2007 UTC (16 years, 7 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.35.2.1: +11 -11 lines
Diff to previous 1.35.2.1 (colored) to branchpoint 1.35 (colored) to selected 1.15 (colored)

Sync with HEAD.

Revision 1.36.2.2 / (download) - annotate - [select for diffs], Sat Aug 4 18:54:14 2007 UTC (16 years, 7 months ago) by ad
Branch: matt-mips64
Changes since 1.36.2.1: +1023 -0 lines
Diff to previous 1.36.2.1 (colored) to branchpoint 1.36 (colored) next main 1.37 (colored) to selected 1.15 (colored)

Make libpthread_dbg build again.

Revision 1.36.2.1, Sat Aug 4 18:54:13 2007 UTC (16 years, 7 months ago) by ad
Branch: matt-mips64
Changes since 1.36: +0 -1023 lines
FILE REMOVED

file pthread_dbg.c was added on branch matt-mips64 on 2007-08-04 18:54:14 +0000

Revision 1.36 / (download) - annotate - [select for diffs], Sat Aug 4 18:54:13 2007 UTC (16 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base2, matt-mips64-base
Branch point for: matt-mips64
Changes since 1.35: +11 -11 lines
Diff to previous 1.35 (colored) to selected 1.15 (colored)

Make libpthread_dbg build again.

Revision 1.35.2.1 / (download) - annotate - [select for diffs], Wed Jul 18 13:36:19 2007 UTC (16 years, 8 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.35: +5 -4 lines
Diff to previous 1.35 (colored) to selected 1.15 (colored)

Initial work on provided correctly aligned __cpu_simple_lock_t for hppa
and first attempt at adapting i386 to the changes.

More to come.

Revision 1.35 / (download) - annotate - [select for diffs], Wed Mar 14 21:09:01 2007 UTC (17 years ago) by skrll
Branch: MAIN
CVS Tags: nick-csl-alignment-base, hpcarm-cleanup
Branch point for: nick-csl-alignment
Changes since 1.34: +2 -34 lines
Diff to previous 1.34 (colored) to selected 1.15 (colored)

Remove more SA libpthread stuff.

Revision 1.34 / (download) - annotate - [select for diffs], Fri Mar 2 18:54:01 2007 UTC (17 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.33: +14 -397 lines
Diff to previous 1.33 (colored) to selected 1.15 (colored)

Remove the PTHREAD_SA option. If M:N threads is reimplemented it's
better off done with a seperate library.

Revision 1.33 / (download) - annotate - [select for diffs], Tue Feb 6 15:24:37 2007 UTC (17 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.32: +26 -18 lines
Diff to previous 1.32 (colored) to selected 1.15 (colored)

Build without sys/sa.h present.

Revision 1.32 / (download) - annotate - [select for diffs], Sun Dec 24 03:47:53 2006 UTC (17 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.31: +40 -7 lines
Diff to previous 1.31 (colored) to selected 1.15 (colored)

just get this to compile again, so that people can build.

Revision 1.31 / (download) - annotate - [select for diffs], Sun May 14 02:16:36 2006 UTC (17 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored) to selected 1.15 (colored)

XXX: GCC uninitialized variable.

Revision 1.16.4.4 / (download) - annotate - [select for diffs], Sat Aug 27 05:17:19 2005 UTC (18 years, 7 months ago) by snj
Branch: netbsd-2
CVS Tags: netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1
Changes since 1.16.4.3: +3 -3 lines
Diff to previous 1.16.4.3 (colored) to branchpoint 1.16 (colored) next main 1.17 (colored) to selected 1.15 (colored)

Pull up following revision(s) (requested by riz in ticket #5615):
	lib/libpthread_dbg/pthread_dbg.c: revision 1.25
Cast integer to pointer types via intptr_t.
Problem reported by Havard Eidnes while building evbsh5.

Revision 1.16.4.3 / (download) - annotate - [select for diffs], Sat Aug 27 05:14:49 2005 UTC (18 years, 7 months ago) by snj
Branch: netbsd-2
Changes since 1.16.4.2: +4 -3 lines
Diff to previous 1.16.4.2 (colored) to branchpoint 1.16 (colored) to selected 1.15 (colored)

Pull up following revision(s) (requested by riz in ticket #5615):
	lib/libpthread_dbg/pthread_dbg.c: revision 1.24
Ouch. Lint didn't like the last change on sparc64. The reason:
<machine/reg.h> plays dirty naming tricks on sparc64 to allow 32bit
compatibility (reg ->  reg64 and the parameter in
PTHREAD_REG_TO_UCONTEXT() is called reg). This probably needs to be
fixed separately, but for now reordering the includes will do.

Revision 1.16.4.2 / (download) - annotate - [select for diffs], Sat Aug 27 05:12:43 2005 UTC (18 years, 7 months ago) by snj
Branch: netbsd-2
Changes since 1.16.4.1: +47 -12 lines
Diff to previous 1.16.4.1 (colored) to branchpoint 1.16 (colored) to selected 1.15 (colored)

Pull up following revision(s) (requested by riz in ticket #5615):
	lib/libpthread_dbg/pthread_dbg_int.h: revision 1.5
	lib/libpthread_dbg/pthread_dbg.c: revision 1.23
Avoid depending on declarations of struct reg and struct fpreg by using
the proc_regsize() callback to allocate reg and fpreg buffers as part of the
proc state (lazily initialized by the PT_STATE_RUNNING case of
td_thr_suspend()).
Fixes build on sh3 (and probably sh5) platforms.

Revision 1.16.4.1 / (download) - annotate - [select for diffs], Wed May 18 18:40:26 2005 UTC (18 years, 10 months ago) by riz
Branch: netbsd-2
Changes since 1.16: +330 -2 lines
Diff to previous 1.16 (colored) to selected 1.15 (colored)

Pull up revision 1.17 (requested by matt in ticket #1526):
1.17:
Add td_thr_suspend() and td_thr_resume(), to suspend and resume
threads from the context of a debugger.

1.18:
td_map_lwps(): there's always one lwp. This makes the call work before
the thread system has started.

Additionally, mark not-on-LWP threads explicitly, so that there's no
risk of using stale information.

1.19:
Add support for reporting and examining suspended threads.

1.20:
Add an offset to the thread ID numbers, because GDB really doesn't
cope with "thread 0".

1.21:
Update cached LWP values when suspending the running thread.

1.22:
Get the td_thread_t * corresponding to nthread to mess with its lwp
data, rather than trying a nonsensical operation on a caddr_t from a
different address space.

Moral: test-compile in the same tree you're working in.

Revision 1.30 / (download) - annotate - [select for diffs], Tue Oct 12 22:17:56 2004 UTC (19 years, 5 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3
Changes since 1.29: +6 -20 lines
Diff to previous 1.29 (colored) to selected 1.15 (colored)

Remove pt_blockuc.  If the debugger attempts to muck with the state of a
blocked thread, return an error; this should be done through ptrace(2).

Revision 1.29 / (download) - annotate - [select for diffs], Sun Jul 18 21:24:52 2004 UTC (19 years, 8 months ago) by chs
Branch: MAIN
Changes since 1.28: +10 -10 lines
Diff to previous 1.28 (colored) to selected 1.15 (colored)

enhance MI pthreads code to support hppa:
 - statically initialize all global spin locks.  on hppa, 0 means
   the lock is held, so leaving them with the default value doesn't work.
 - compare functions pointers using a function-pointer type rather than
   an integral type.  on hppa, function pointers may be indirect,
   so we need to trigger gcc to emit calls to the function-pointer
   canonicalization routines in the millicode.
 - on hppa the stack grows up, so handle that using the STACK_* macros.

Revision 1.28 / (download) - annotate - [select for diffs], Tue Jul 6 19:33:53 2004 UTC (19 years, 8 months ago) by nathanw
Branch: MAIN
Changes since 1.27: +4 -3 lines
Diff to previous 1.27 (colored) to selected 1.15 (colored)

Recognize thread objects in addr2sync.

Revision 1.27 / (download) - annotate - [select for diffs], Thu Jul 1 18:59:52 2004 UTC (19 years, 9 months ago) by nathanw
Branch: MAIN
Changes since 1.26: +4 -2 lines
Diff to previous 1.26 (colored) to selected 1.15 (colored)

td_sync_info(): explicitly clear the "locked" flag when unlocked,
instead of leaving it as garbage.

Revision 1.26 / (download) - annotate - [select for diffs], Thu Jul 1 18:27:36 2004 UTC (19 years, 9 months ago) by nathanw
Branch: MAIN
Changes since 1.25: +4 -3 lines
Diff to previous 1.25 (colored) to selected 1.15 (colored)

td_map_addr2sync(): recognize read-write lock objects.

Revision 1.25 / (download) - annotate - [select for diffs], Fri Jun 11 07:28:05 2004 UTC (19 years, 9 months ago) by scw
Branch: MAIN
Changes since 1.24: +3 -3 lines
Diff to previous 1.24 (colored) to selected 1.15 (colored)

Cast integer to pointer types via intptr_t.
Problem reported by Havard Eidnes while building evbsh5.

Revision 1.24 / (download) - annotate - [select for diffs], Thu Jun 10 18:06:19 2004 UTC (19 years, 9 months ago) by martin
Branch: MAIN
Changes since 1.23: +4 -3 lines
Diff to previous 1.23 (colored) to selected 1.15 (colored)

Ouch. Lint didn't like the last change on sparc64. The reason:
<machine/reg.h> plays dirty naming tricks on sparc64 to allow 32bit
compatibility (reg ->  reg64 and the parameter in
PTHREAD_REG_TO_UCONTEXT() is called reg). This probably needs to be
fixed separately, but for now reordering the includes will do.

Revision 1.23 / (download) - annotate - [select for diffs], Thu Jun 10 01:38:29 2004 UTC (19 years, 9 months ago) by nathanw
Branch: MAIN
Changes since 1.22: +47 -12 lines
Diff to previous 1.22 (colored) to selected 1.15 (colored)

Avoid depending on declarations of struct reg and struct fpreg by using
the proc_regsize() callback to allocate reg and fpreg buffers as part of the
proc state (lazily initialized by the PT_STATE_RUNNING case of
td_thr_suspend()).

Fixes build on sh3 (and probably sh5) platforms.

Revision 1.22 / (download) - annotate - [select for diffs], Thu Jun 3 15:22:08 2004 UTC (19 years, 9 months ago) by nathanw
Branch: MAIN
Changes since 1.21: +9 -7 lines
Diff to previous 1.21 (colored) to selected 1.15 (colored)

Get the td_thread_t * corresponding to nthread to mess with its lwp
data, rather than trying a nonsensical operation on a caddr_t from a
different address space.

Moral: test-compile in the same tree you're working in.

Revision 1.21 / (download) - annotate - [select for diffs], Thu Jun 3 00:31:28 2004 UTC (19 years, 9 months ago) by nathanw
Branch: MAIN
Changes since 1.20: +4 -3 lines
Diff to previous 1.20 (colored) to selected 1.15 (colored)

Update cached LWP values when suspending the running thread.

Revision 1.20 / (download) - annotate - [select for diffs], Thu Jun 3 00:20:24 2004 UTC (19 years, 9 months ago) by nathanw
Branch: MAIN
Changes since 1.19: +9 -2 lines
Diff to previous 1.19 (colored) to selected 1.15 (colored)

Add an offset to the thread ID numbers, because GDB really doesn't
cope with "thread 0".

Revision 1.19 / (download) - annotate - [select for diffs], Wed Jun 2 21:18:25 2004 UTC (19 years, 9 months ago) by nathanw
Branch: MAIN
Changes since 1.18: +7 -2 lines
Diff to previous 1.18 (colored) to selected 1.15 (colored)

Add support for reporting and examining suspended threads.

Revision 1.18 / (download) - annotate - [select for diffs], Wed Jun 2 21:15:42 2004 UTC (19 years, 9 months ago) by nathanw
Branch: MAIN
Changes since 1.17: +9 -2 lines
Diff to previous 1.17 (colored) to selected 1.15 (colored)

td_map_lwps(): there's always one lwp. This makes the call work before
the thread system has started.

Additionally, mark not-on-LWP threads explicitly, so that there's no
risk of using stale information.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Jun 2 21:13:42 2004 UTC (19 years, 9 months ago) by nathanw
Branch: MAIN
Changes since 1.16: +308 -2 lines
Diff to previous 1.16 (colored) to selected 1.15 (colored)

Add td_thr_suspend() and td_thr_resume(), to suspend and resume
threads from the context of a debugger.

Revision 1.16 / (download) - annotate - [select for diffs], Sat Feb 21 20:48:11 2004 UTC (20 years, 1 month ago) by cl
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0
Branch point for: netbsd-2
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored)

Actually test pthread__dbg to check if another gdb is attached (and not
pthread__tsd_destructors whose address happens to be in addr).

Revision 1.15 / (download) - annotate - [selected], Wed Feb 11 21:07:18 2004 UTC (20 years, 1 month ago) by nathanw
Branch: MAIN
Changes since 1.14: +18 -2 lines
Diff to previous 1.14 (colored)

td_thr_getregs(): Return errors when the requested bit of register state
isn't in the ucontext.
td_thr_getregs(), td_thr_setregs(): Use "xreg" macros when defined.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Feb 3 20:26:16 2004 UTC (20 years, 1 month ago) by nathanw
Branch: MAIN
Changes since 1.13: +5 -5 lines
Diff to previous 1.13 (colored) to selected 1.15 (colored)

Test pt_blockgen against pt_unblockgen, not against itself, to check
for blocked-in-kernel situations.

Revision 1.13 / (download) - annotate - [select for diffs], Mon Feb 2 20:36:19 2004 UTC (20 years, 1 month ago) by nathanw
Branch: MAIN
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored) to selected 1.15 (colored)

Rename pt_stacksize, pt_stacksize_lg, and pt_stackmask to pthread_*. External
symbols can't start with pt_, as that is in the application namespace.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Feb 2 20:08:27 2004 UTC (20 years, 1 month ago) by nathanw
Branch: MAIN
Changes since 1.11: +87 -89 lines
Diff to previous 1.11 (colored) to selected 1.15 (colored)

Do all the symbol lookups at td_open() time and cache them in the td_proc_st.
Make the stacksize lookups and data part of td_proc_st rather than global state.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Dec 31 16:46:34 2003 UTC (20 years, 3 months ago) by cl
Branch: MAIN
Changes since 1.10: +75 -28 lines
Diff to previous 1.10 (colored) to selected 1.15 (colored)

catch up with block/unblock changes in libpthread

Revision 1.10 / (download) - annotate - [select for diffs], Thu Nov 27 16:32:09 2003 UTC (20 years, 4 months ago) by cl
Branch: MAIN
Changes since 1.9: +40 -2 lines
Diff to previous 1.9 (colored) to selected 1.15 (colored)

Add td__getstacksize() to support variable stack sizes.

Revision 1.9 / (download) - annotate - [select for diffs], Thu Sep 11 21:57:32 2003 UTC (20 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored) to selected 1.15 (colored)

add a cast to make lint happy.

Revision 1.8 / (download) - annotate - [select for diffs], Thu Jul 17 21:14:49 2003 UTC (20 years, 8 months ago) by nathanw
Branch: MAIN
Changes since 1.7: +43 -43 lines
Diff to previous 1.7 (colored) to selected 1.15 (colored)

Adapt to structure name changes.

Revision 1.7 / (download) - annotate - [select for diffs], Thu Jun 26 21:51:59 2003 UTC (20 years, 9 months ago) by nathanw
Branch: MAIN
Changes since 1.6: +19 -6 lines
Diff to previous 1.6 (colored) to selected 1.15 (colored)

Preferentially read context pointer from pt_trapuc.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Apr 5 01:39:13 2003 UTC (20 years, 11 months ago) by nathanw
Branch: MAIN
Changes since 1.5: +26 -26 lines
Diff to previous 1.5 (colored) to selected 1.15 (colored)

A couple of READ calls in td_sync_info() were reading into a
pthread_spin_t variable (4 bytes) but telling read that they were
reading sizeof(struct pthread_spinlock_st) (12 bytes). This led to
overwriting other things on the stack, like the return address. Oops.

Fix by changing READ call here (and elsewhere, for future safety) to:
  READ(,, &variable, sizeof(variable))
instead of
  READ(,, &variable, sizeof(type)).

Fixes a crash in gdb when running "thread examine all" reported by
Bill Studenmund.

Revision 1.5 / (download) - annotate - [select for diffs], Sat Mar 8 08:03:37 2003 UTC (21 years ago) by lukem
Branch: MAIN
Changes since 1.4: +4 -1 lines
Diff to previous 1.4 (colored) to selected 1.15 (colored)

add __RCSID()

Revision 1.4 / (download) - annotate - [select for diffs], Thu Feb 27 00:54:07 2003 UTC (21 years, 1 month ago) by nathanw
Branch: MAIN
Changes since 1.3: +32 -2 lines
Diff to previous 1.3 (colored) to selected 1.15 (colored)

Add hooks to read the application-assigned name of a thread.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Jan 18 19:10:41 2003 UTC (21 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.2: +21 -18 lines
Diff to previous 1.2 (colored) to selected 1.15 (colored)

de-lint

Revision 1.2 / (download) - annotate - [select for diffs], Sat Jan 18 10:34:23 2003 UTC (21 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.1: +895 -0 lines
Diff to previous 1.1 (colored) to selected 1.15 (colored)

Merge the nathanw_sa branch.

Revision 1.1.2.10 / (download) - annotate - [select for diffs], Tue Jan 7 00:54:29 2003 UTC (21 years, 2 months ago) by nathanw
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.1.2.9: +3 -3 lines
Diff to previous 1.1.2.9 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored) to selected 1.15 (colored)

Catch up with renaming of allqueue to pthread__allqueue.

Revision 1.1.2.9 / (download) - annotate - [select for diffs], Tue Dec 10 15:33:48 2002 UTC (21 years, 3 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.1.2.8: +3 -3 lines
Diff to previous 1.1.2.8 (colored) to branchpoint 1.1 (colored) to selected 1.15 (colored)

Make this compile again.

Revision 1.1.2.8 / (download) - annotate - [select for diffs], Fri Dec 6 20:58:10 2002 UTC (21 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.1.2.7: +38 -2 lines
Diff to previous 1.1.2.7 (colored) to branchpoint 1.1 (colored) to selected 1.15 (colored)

rwlock support.

Revision 1.1.2.7 / (download) - annotate - [select for diffs], Wed Oct 16 19:34:15 2002 UTC (21 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.1.2.6: +27 -1 lines
Diff to previous 1.1.2.6 (colored) to branchpoint 1.1 (colored) to selected 1.15 (colored)

Implement td_map_lwps().

Revision 1.1.2.6 / (download) - annotate - [select for diffs], Tue Oct 8 19:53:54 2002 UTC (21 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.1.2.5: +17 -11 lines
Diff to previous 1.1.2.5 (colored) to branchpoint 1.1 (colored) to selected 1.15 (colored)

Comment whitespace.

Revision 1.1.2.5 / (download) - annotate - [select for diffs], Fri Oct 4 00:44:55 2002 UTC (21 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.1.2.4: +2 -1 lines
Diff to previous 1.1.2.4 (colored) to branchpoint 1.1 (colored) to selected 1.15 (colored)

Map the stack pointer stored in the mutex's owner slot to a thread ID.

Revision 1.1.2.4 / (download) - annotate - [select for diffs], Tue Oct 1 20:43:39 2002 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.1.2.3: +6 -11 lines
Diff to previous 1.1.2.3 (colored) to branchpoint 1.1 (colored) to selected 1.15 (colored)

Track LWP<->thread mappings discovered by td_map_lwp2thr(), and use
them in the GETREGS and SETREGS calls.

Revision 1.1.2.3 / (download) - annotate - [select for diffs], Tue Aug 6 20:05:36 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.1.2.2: +2 -1 lines
Diff to previous 1.1.2.2 (colored) to branchpoint 1.1 (colored) to selected 1.15 (colored)

Need memcpy() prototype.

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Tue Aug 6 06:10:59 2002 UTC (21 years, 7 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.1.2.1: +1 -2 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored) to selected 1.15 (colored)

Fix whitespace typo in notice.

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Wed Jul 31 23:05:19 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.1: +831 -0 lines
Diff to previous 1.1 (colored) to selected 1.15 (colored)

pthread debugging interface library.

Revision 1.1, Wed Jul 31 23:05:18 2002 UTC (21 years, 8 months ago) by nathanw
Branch: MAIN
CVS Tags: nathanw_sa_before_merge
Branch point for: nathanw_sa
FILE REMOVED

file pthread_dbg.c was initially added on branch nathanw_sa.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>