This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

src/gdb ChangeLog linux-thread-db.c doc/Change ...


CVSROOT:	/cvs/src
Module name:	src
Changes by:	ppluzhnikov@sourceware.org	2010-07-31 15:34:41

Modified files:
	gdb            : ChangeLog linux-thread-db.c 
	gdb/doc        : ChangeLog gdb.texinfo 

Log message:
	Index: ChangeLog
	===================================================================
	RCS file: /cvs/src/src/gdb/ChangeLog,v
	retrieving revision 1.12051
	diff -u -p -u -r1.12051 ChangeLog
	--- ChangeLog	31 Jul 2010 04:17:42 -0000	1.12051
	+++ ChangeLog	31 Jul 2010 15:27:37 -0000
	@@ -1,3 +1,11 @@
	+2010-07-31  Paul Pluzhnikov  <ppluzhnikov@google.com>
	+
	+	* linux-thread-db.c (libthread_db_debug): New variable.
	+	(thread_db_find_new_threads_silently): Control verbosity with it.
	+	(try_thread_db_load_1, try_thread_db_load): Likewise.
	+	(find_new_threads_once): Likewise.
	+	(_initialize_thread_db): Set/show it.
	+
	2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
	
	* common/signals.c (signals): Move the content to signals.def.
	Index: linux-thread-db.c
	===================================================================
	RCS file: /cvs/src/src/gdb/linux-thread-db.c,v
	retrieving revision 1.75
	diff -u -p -u -r1.75 linux-thread-db.c
	--- linux-thread-db.c	11 Jun 2010 12:10:12 -0000	1.75
	+++ linux-thread-db.c	31 Jul 2010 15:27:37 -0000
	@@ -75,6 +75,18 @@
	
	static char *libthread_db_search_path;
	
	+/* If non-zero, print details of libthread_db processing.  */
	+
	+static int libthread_db_debug;
	+
	+static void
	+show_libthread_db_debug (struct ui_file *file, int from_tty,
	+			 struct cmd_list_element *c, const char *value)
	+{
	+  fprintf_filtered (file, _("libthread-db debugging is %s.\n"), value);
	+}
	+
	+
	/* If we're running on GNU/Linux, we must explicitly attach to any new
	threads.  */
	
	@@ -601,7 +613,7 @@ thread_db_find_new_threads_silently (pti
	thread_db_find_new_threads_2 (ptid, 1);
	}
	
	-  if (except.reason < 0 && info_verbose)
	+  if (except.reason < 0 && libthread_db_debug)
	{
	exception_fprintf (gdb_stderr, except,
	"Warning: thread_db_find_new_threads_silently: ");
	@@ -658,7 +670,7 @@ try_thread_db_load_1 (struct thread_db_i
	err = info->td_ta_new_p (&info->proc_handle, &info->thread_agent);
	if (err != TD_OK)
	{
	-      if (info_verbose)
	+      if (libthread_db_debug)
	printf_unfiltered (_("td_ta_new failed: %s\n"),
	thread_db_err_str (err));
	else
	@@ -708,7 +720,7 @@ try_thread_db_load_1 (struct thread_db_i
	
	printf_unfiltered (_("[Thread debugging using libthread_db enabled]\n"));
	
	-  if (info_verbose || *libthread_db_search_path)
	+  if (libthread_db_debug || *libthread_db_search_path)
	{
	const char *library;
	
	@@ -745,18 +757,18 @@ try_thread_db_load (const char *library)
	void *handle;
	struct thread_db_info *info;
	
	-  if (info_verbose)
	+  if (libthread_db_debug)
	printf_unfiltered (_("Trying host libthread_db library: %s.\n"),
	library);
	handle = dlopen (library, RTLD_NOW);
	if (handle == NULL)
	{
	-      if (info_verbose)
	+      if (libthread_db_debug)
	printf_unfiltered (_("dlopen failed: %s.\n"), dlerror ());
	return 0;
	}
	
	-  if (info_verbose && strchr (library, '/') == NULL)
	+  if (libthread_db_debug && strchr (library, '/') == NULL)
	{
	void *td_init;
	
	@@ -1381,7 +1393,7 @@ find_new_threads_once (struct thread_db_
	TD_THR_ANY_USER_FLAGS);
	}
	
	-  if (info_verbose)
	+  if (libthread_db_debug)
	{
	if (except.reason < 0)
	exception_fprintf (gdb_stderr, except,
	@@ -1685,6 +1697,16 @@ gdb itself."),
	NULL,
	NULL,
	&setlist, &showlist);
	+
	+  add_setshow_zinteger_cmd ("libthread-db", class_maintenance,
	+			    &libthread_db_debug, _("\
	+Set libthread-db debugging."), _("\
	+Show libthread-db debugging."), _("\
	+When non-zero, libthread-db debugging is enabled."),
	+			    NULL,
	+			    show_libthread_db_debug,
	+			    &setdebuglist, &showdebuglist);
	+
	/* Add ourselves to objfile event chain.  */
	observer_attach_new_objfile (thread_db_new_objfile);
	}
	Index: doc/ChangeLog
	===================================================================
	RCS file: /cvs/src/src/gdb/doc/ChangeLog,v
	retrieving revision 1.1092
	diff -u -p -u -r1.1092 ChangeLog
	--- doc/ChangeLog	30 Jul 2010 20:46:34 -0000	1.1092
	+++ doc/ChangeLog	31 Jul 2010 15:27:37 -0000
	@@ -1,3 +1,7 @@
	+2010-07-31  Paul Pluzhnikov  <ppluzhnikov@google.com>
	+
	+	* gdb.texinfo (Threads): Document 'debug libthread-db'.
	+
	2010-07-30  Tom Tromey  <tromey@redhat.com>
	
	* gdb.texinfo (Index Files): Mention gdb-add-index.
	Index: doc/gdb.texinfo
	===================================================================
	RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
	retrieving revision 1.746
	diff -u -p -u -r1.746 gdb.texinfo
	--- doc/gdb.texinfo	30 Jul 2010 20:46:34 -0000	1.746
	+++ doc/gdb.texinfo	31 Jul 2010 15:27:38 -0000
	@@ -2864,6 +2864,14 @@ only on some platforms.
	@kindex show libthread-db-search-path
	@item show libthread-db-search-path
	Display current libthread_db search path.
	+
	+@kindex set debug libthread-db
	+@kindex show debug libthread-db
	+@cindex debugging @code{libthread_db}
	+@item set debug libthread-db
	+@itemx show debug libthread-db
	+Turns on or off display of @code{libthread_db}-related events.
	+Use @code{1} to enable, @code{0} to disable.
	@end table
	
	@node Forks

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.12051&r2=1.12052
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/linux-thread-db.c.diff?cvsroot=src&r1=1.75&r2=1.76
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/ChangeLog.diff?cvsroot=src&r1=1.1092&r2=1.1093
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/gdb.texinfo.diff?cvsroot=src&r1=1.746&r2=1.747


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]