Mark Kettenis | 1 Jan 2012 13:36
Picon
Picon
Favicon

[PATCH] Multi-thread core file support for OpenBSD

Our core files are modelled after NetBSD's, so this re-uses the NetBSD
code to get the thread/LWP IDs.

ok?

2012-01-01  Mark Kettenis  <kettenis <at> gnu.org>

	* elf.c (elfcore_grok_openbsd_note): Initialize core_lwpid.

Index: elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.546
diff -u -p -r1.546 elf.c
--- elf.c	13 Dec 2011 14:02:18 -0000	1.546
+++ elf.c	1 Jan 2012 12:32:31 -0000
 <at>  <at>  -8642,6 +8642,11  <at>  <at>  elfcore_grok_openbsd_procinfo (bfd *abfd
 static bfd_boolean
 elfcore_grok_openbsd_note (bfd *abfd, Elf_Internal_Note *note)
 {
+  int lwp;
+
+  if (elfcore_netbsd_get_lwpid (note, &lwp))
+    elf_tdata (abfd)->core_lwpid = lwp;
+
   if (note->type == NT_OPENBSD_PROCINFO)
     return elfcore_grok_openbsd_procinfo (abfd, note);

Iain Sandoe | 1 Jan 2012 20:07
Picon

Re: [RFC] Add support for .debug_gdb_scripts to mach-o.


On 31 Dec 2011, at 15:12, Iain Sandoe wrote:

>> There is a testcase for .debug_gdb_scripts in
>> gdb/testsuite/gdb.python/py-section-script.exp
>> but I'm not sure it'll work as is on mach-o.
>
> no, it won't - we don't yet support .push/pop section in mach-o gas.

Alas, although that wasn't too hard to implement, we're still some way  
away from being able to build GCC with GAS, so we still need to work  
with the native system tools.

> (will try to fit in a look at this, at some stage

With http://sourceware.org/ml/gdb-patches/2011-12/msg00890.html  
applied, the following patch below gives:

Native configuration is i686-apple-darwin9

                 === gdb tests ===
...
Running ../../../src-git/gdb/testsuite/gdb.python/py-section- 
script.exp ...

                 === gdb Summary ===

# of expected passes            6

====
(Continue reading)

Jan Kratochvil | 1 Jan 2012 21:36
Picon
Favicon

Re: [PATCH] gdbserver: install gdbreplay too

On Sat, 31 Dec 2011 09:58:08 +0100, Mike Frysinger wrote:
> The gdbreplay binary is pretty useful, so install it by default like we
> do with gdbserver already.

If it becomes the standard installation part there would be very useful a man
page.  Similar case is being discussed in:
	Re: [patch] gdb_gcore man/help/install [+doc] #2
	http://sourceware.org/ml/gdb-patches/2011-12/msg00659.html

Thanks,
Jan

Jan Kratochvil | 1 Jan 2012 22:51
Picon
Favicon

[commit 7.4] [NEWS patch] Re: [patch 1/2] Make gdbtui a shell script

On Thu, 22 Dec 2011 11:12:58 +0100, Jan Kratochvil wrote:
> On Thu, 22 Dec 2011 06:21:36 +0100, Joel Brobecker wrote:
> > Works for me!

Checked into 7.4.  Kept 2011 ChangeLog for the 2012 entry as AFAIK the
ChangeLogs do not rotate in the branched repositories.

(Not yet checked in the real patch to HEAD as I hope Joel will run the
year-rotating scripts soon.)

Thanks,
Jan

http://sourceware.org/ml/gdb-cvs/2012-01/msg00002.html

--- src/gdb/ChangeLog	2011/12/23 17:55:16	1.13614.2.22
+++ src/gdb/ChangeLog	2012/01/01 21:47:07	1.13614.2.23
 <at>  <at>  -1,3 +1,8  <at>  <at> 
+2012-01-01  Jan Kratochvil  <jan.kratochvil <at> redhat.com>
+
+	* NEWS (Changes in GDB 7.4): Add gdbtui deprecation note.
+	* tui/tui-main.c: Likewise.
+
 2011-12-23  Kevin Pouget  <kevin.pouget <at> st.com>

 	Introduce gdb.FinishBreakpoint in Python
--- src/gdb/NEWS	2011/12/23 17:55:20	1.472.2.2
+++ src/gdb/NEWS	2012/01/01 21:47:08	1.472.2.3
 <at>  <at>  -258,6 +258,11  <at>  <at> 

(Continue reading)

Jan Kratochvil | 1 Jan 2012 23:21
Picon
Favicon

Re: [patch] Fix gdb.cp/gdb2495.exp regression with gcc-4.7 #3

Hi Joel,

On Fri, 30 Dec 2011 12:11:04 +0100, Jan Kratochvil wrote:
> 2011-12-30  Jan Kratochvil  <jan.kratochvil <at> redhat.com>
> 	    Joel Brobecker  <brobecker <at> adacore.com>
> 
> 	Fix regression for gdb.cp/gdb2495.exp with gcc-4.7.
> 	* arch-utils.c (displaced_step_at_entry_point): Incrase BP_LEN skip to
> 	3 times.
> 	* infcall.c (call_function_by_hand) <AT_SYMBOL>: Move it upwards and
> 	fall through into AT_ENTRY_POINT.
> 	(call_function_by_hand) <AT_ENTRY_POINT>: New variable bp_len.  Adjust
> 	DUMMY_ADDR with it.
> 	* ppc-linux-tdep.c (ppc_linux_displaced_step_location): Increase
> 	PPC_INSN_SIZE skip to 3 times.

FYI do you still plan the 7.4 release tomorrow?  For example this should go in
IMO, gcc-4.7 will be GA (and for example gcc-4.7 built Fedora 17 GA is
2012-05-08), both before gdb-7.5 will be GA, just the HEAD files are not
rotated yet for 2012.

Thanks,
Jan

Doug Evans | 2 Jan 2012 01:15
Picon
Favicon

[commit] minor cleanups in dwarf2read.c

Hi.

While hacking on dwarf2read.c I'm still finding some clumsiness
and cleanup that can be done.

Ultimately, I think I may make changes that end up replacing a lot
of this cleanup.  However, until then I don't mind cleaning things
up as I go.  At least it helps clarify subsequence changes.

This patch is just some comment and formatting tweaks,
separated out.

btw, I didn't update the copyright year on purpose.
We generally update all files en masse, and I didn't
want to interfere with that.

2012-01-01  Doug Evans  <dje <at> google.com>

	* dwarf2read.c (dwarf2_per_objfile): Add comment.
	(dwarf2_elf_names): Minor reformat.
	(dwarf2_per_cu_data): Tweak comment.
	(dwarf2_read_section): Fix comment.
	(create_all_comp_units): Fix comment.
	(load_full_comp_unit): Fix comment.
	(process_full_comp_unit): Fix comment.
	(read_signatured_type): Fix comment.

Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
(Continue reading)

Doug Evans | 2 Jan 2012 01:26
Picon
Favicon

[commit] dwarf2read.c (free_heap_comp_unit): Renamed from free_one_comp_unit.

Hi.

It helped clarify things in my mind to have the name match where it
came from given that there is also free_stack_comp_unit.

2012-01-01  Doug Evans  <dje <at> google.com>

	* dwarf2read.c (free_heap_comp_unit): Renamed from free_one_comp_unit.
	All callers updated.

Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.590
diff -u -p -r1.590 dwarf2read.c
--- dwarf2read.c	2 Jan 2012 00:09:58 -0000	1.590
+++ dwarf2read.c	2 Jan 2012 00:21:06 -0000
 <at>  <at>  -1277,7 +1277,7  <at>  <at>  static void init_one_comp_unit (struct d
 static void prepare_one_comp_unit (struct dwarf2_cu *cu,
 				   struct die_info *comp_unit_die);

-static void free_one_comp_unit (void *);
+static void free_heap_comp_unit (void *);

 static void free_cached_comp_units (void *);

 <at>  <at>  -3714,7 +3714,7  <at>  <at>  load_partial_comp_unit (struct dwarf2_pe
       read_cu = 1;

       /* If an error occurs while loading, release our storage.  */
(Continue reading)

Doug Evans | 2 Jan 2012 01:31
Picon
Favicon

[commit] dwarf2read.c (load_cu): Move assert to more useful location.

Hi.

There's no point in asserting a pointer != NULL after you've
dereferenced it.

2012-01-01  Doug Evans  <dje <at> google.com>

	* dwarf2read.c (load_cu): Move assert to more useful location.

Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.591
diff -u -p -r1.591 dwarf2read.c
--- dwarf2read.c	2 Jan 2012 00:23:50 -0000	1.591
+++ dwarf2read.c	2 Jan 2012 00:28:08 -0000
 <at>  <at>  -1833,9 +1833,9  <at>  <at>  load_cu (struct dwarf2_per_cu_data *per_
   else
     load_full_comp_unit (per_cu, per_cu->objfile);

-  dwarf2_find_base_address (per_cu->cu->dies, per_cu->cu);
-
   gdb_assert (per_cu->cu != NULL);
+
+  dwarf2_find_base_address (per_cu->cu->dies, per_cu->cu);
 }

 /* Read in the symbols for PER_CU.  OBJFILE is the objfile from which

(Continue reading)

Doug Evans | 2 Jan 2012 01:52
Picon
Favicon

[commit] dwarf2read.c: Don't pass per_cu and objfile.

Hi.

There's some clumsiness in the passing of objfile in dwarf2read.c.
This patch cleans up some of it.
There's no point in passing objfile when you're also passing per_cu.

2012-01-01  Doug Evans  <dje <at> google.com>

	* dwarf2read.c (read_signatured_type): Delete `objfile' arg.
	All callers updated.
	(load_full_comp_unit, queue_comp_unit, process_queue): Ditto.
	(dw2_do_instantiate_symtab, dw2_instantiate_symtab): Ditto.
	(process_psymtab_comp_unit, load_partial_comp_unit): Ditto.

Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.592
diff -u -p -r1.592 dwarf2read.c
--- dwarf2read.c	2 Jan 2012 00:29:19 -0000	1.592
+++ dwarf2read.c	2 Jan 2012 00:40:31 -0000
 <at>  <at>  -1225,8 +1225,7  <at>  <at>  static void read_signatured_type_at_offs
 					    struct dwarf2_section_info *sect,
 					    unsigned int offset);

-static void read_signatured_type (struct objfile *,
-				  struct signatured_type *type_sig);
+static void read_signatured_type (struct signatured_type *type_sig);

 /* memory allocation interface */
(Continue reading)

Doug Evans | 2 Jan 2012 02:28
Picon
Favicon

[commit] dwarf2read.c: Simplify some objfile references.

Hi.

This patch addresses another bit of clumsiness in referencing "objfile".
Some functions fetch it from various different locations.
This consolidates them all by following the prevalent convention of
initializing objfile at the start of the function and using that throughout.

2012-01-01  Doug Evans  <dje <at> google.com>

	* dwarf2read.c (dwarf2_compute_name): Simplify objfile references.
	(dwarf2_physname, read_import_statement): Ditto.
	(read_call_site_scope, dwarf2_record_block_ranges): Ditto.
	(process_structure_scope read_subroutine_type): Ditto.
	(read_typedef, load_partial_dies, read_partial_die): Ditto.
	(find_partial_die, dwarf_decode_lines, lookup_die_type): Ditto.
	(dwarf2_fetch_die_location_block): Ditto.
	(dwarf_decode_macros, dwarf2_symbol_mark_computed): Ditto.

Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.593
diff -u -p -r1.593 dwarf2read.c
--- dwarf2read.c	2 Jan 2012 00:50:07 -0000	1.593
+++ dwarf2read.c	2 Jan 2012 01:00:12 -0000
 <at>  <at>  -5078,6 +5078,8  <at>  <at>  static const char *
 dwarf2_compute_name (char *name, struct die_info *die, struct dwarf2_cu *cu,
 		     int physname)
 {
+  struct objfile *objfile = cu->objfile;
(Continue reading)


Gmane