rpms/gdb/devel gdb-archer.patch,1.21,1.22 gdb.spec,1.371,1.372

Jan Kratochvil jkratoch at fedoraproject.org
Tue Aug 11 18:07:06 UTC 2009


Author: jkratoch

Update of /cvs/pkgs/rpms/gdb/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17314

Modified Files:
	gdb-archer.patch gdb.spec 
Log Message:
* Tue Aug 11 2009 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.8.50.20090811-2
- archer-jankratochvil-fedora12 commit: 93f5e942bdcdcc376ece452c309bedabae71def9
- Fix "can't compute CFA for this frame" (by Tom Tromey, BZ 516627).


gdb-archer.patch:
 Makefile.in                                              |   95 
 NEWS                                                     |    7 
 ada-lang.c                                               |   43 
 block.c                                                  |   23 
 block.h                                                  |    2 
 breakpoint.c                                             |  102 
 breakpoint.h                                             |    3 
 c-exp.y                                                  |  252 ++
 c-lang.c                                                 |    6 
 c-typeprint.c                                            |   47 
 cli/cli-cmds.c                                           |   72 
 coffread.c                                               |    3 
 config.in                                                |    8 
 config/i386/nm-i386.h                                    |  125 +
 config/i386/nm-linux64.h                                 |   54 
 config/mips/nm-irix5.h                                   |   44 
 configure                                                |   79 
 configure.ac                                             |   47 
 cp-name-parser.y                                         |    5 
 cp-namespace.c                                           |  223 +-
 cp-support.c                                             |   88 
 cp-support.h                                             |   59 
 dbxread.c                                                |    1 
 doc/gdb.texinfo                                          |  504 ++++
 doc/gdbint.texinfo                                       |   62 
 doc/observer.texi                                        |   14 
 dwarf2-frame.c                                           |   33 
 dwarf2-frame.h                                           |    4 
 dwarf2expr.c                                             |  102 
 dwarf2expr.h                                             |   70 
 dwarf2loc.c                                              |  361 +++
 dwarf2loc.h                                              |    6 
 dwarf2read.c                                             | 1538 +++++++++------
 elfread.c                                                |   11 
 eval.c                                                   |  170 +
 expression.h                                             |   11 
 f-exp.y                                                  |    4 
 f-lang.c                                                 |  413 ----
 f-lang.h                                                 |   38 
 f-typeprint.c                                            |   36 
 f-valprint.c                                             |  267 --
 findcmd.c                                                |  111 -
 findvar.c                                                |  126 -
 frame.c                                                  |   17 
 frame.h                                                  |    6 
 gdbinit.in                                               |   10 
 gdbserver/linux-i386-low.c                               |  210 ++
 gdbserver/linux-x86-64-low.c                             |  184 +
 gdbthread.h                                              |    3 
 gdbtypes.c                                               |  596 +++++
 gdbtypes.h                                               |  140 +
 gnu-v3-abi.c                                             |   18 
 gnulib/Makefile.in                                       |    4 
 jv-lang.c                                                |    1 
 language.h                                               |    1 
 linespec.c                                               |   62 
 m2-lang.c                                                |    1 
 machoread.c                                              |    1 
 main.c                                                   |   80 
 maint.c                                                  |    8 
 mdebugread.c                                             |    2 
 mi/mi-cmd-var.c                                          |  115 -
 mi/mi-cmds.c                                             |    2 
 mi/mi-cmds.h                                             |    2 
 mi/mi-main.c                                             |    5 
 mipsread.c                                               |    1 
 objfiles.c                                               |   27 
 objfiles.h                                               |   21 
 parse.c                                                  |  154 +
 parser-defs.h                                            |   25 
 printcmd.c                                               |   90 
 python/lib/gdb/FrameIterator.py                          |   33 
 python/lib/gdb/FrameWrapper.py                           |  112 +
 python/lib/gdb/__init__.py                               |   19 
 python/lib/gdb/backtrace.py                              |   42 
 python/lib/gdb/command/__init__.py                       |    1 
 python/lib/gdb/command/alias.py                          |   59 
 python/lib/gdb/command/backtrace.py                      |  106 +
 python/lib/gdb/command/ignore_errors.py                  |   37 
 python/lib/gdb/command/pahole.py                         |   75 
 python/lib/gdb/command/require.py                        |   57 
 python/lib/gdb/command/save_breakpoints.py               |   65 
 python/lib/gdb/command/upto.py                           |  129 +
 python/lib/gdb/function/__init__.py                      |    1 
 python/lib/gdb/function/caller_is.py                     |   58 
 python/lib/gdb/function/in_scope.py                      |   47 
 python/python-block.c                                    |  265 ++
 python/python-breakpoint.c                               |  665 ++++++
 python/python-cmd.c                                      |   17 
 python/python-frame.c                                    |  116 +
 python/python-hooks.c                                    |   50 
 python/python-inferior.c                                 |  926 +++++++++
 python/python-infthread.c                                |  285 ++
 python/python-internal.h                                 |   69 
 python/python-membuf.c                                   |  268 ++
 python/python-param.c                                    |  606 +++++
 python/python-prettyprint.c                              |   21 
 python/python-symbol.c                                   |  336 +++
 python/python-symtab.c                                   |  322 +++
 python/python-type.c                                     |  170 +
 python/python-utils.c                                    |   46 
 python/python-value.c                                    |  123 +
 python/python.c                                          |  384 +++
 python/python.h                                          |    8 
 scm-lang.c                                               |    1 
 scm-valprint.c                                           |    4 
 solib-darwin.c                                           |    1 
 solib-spu.c                                              |    7 
 solib-svr4.c                                             |    4 
 solib.c                                                  |    3 
 solist.h                                                 |    2 
 somread.c                                                |    1 
 spu-tdep.c                                               |    2 
 stabsread.c                                              |    4 
 stack.c                                                  |   38 
 symfile.c                                                |   55 
 symfile.h                                                |   12 
 symmisc.c                                                |    4 
 symtab.c                                                 |  316 +--
 symtab.h                                                 |   17 
 target.h                                                 |   22 
 testsuite/ChangeLog                                      |   97 
 testsuite/gdb.arch/powerpc-power7.exp                    |  175 +
 testsuite/gdb.arch/powerpc-power7.s                      |  107 +
 testsuite/gdb.arch/x86_64-vla-typedef-foo.S              |  455 ++++
 testsuite/gdb.arch/x86_64-vla-typedef.c                  |   43 
 testsuite/gdb.arch/x86_64-vla-typedef.exp                |   64 
 testsuite/gdb.base/arrayidx.c                            |    7 
 testsuite/gdb.base/arrayidx.exp                          |   10 
 testsuite/gdb.base/help.exp                              |    2 
 testsuite/gdb.base/lineno-makeup-func.c                  |   21 
 testsuite/gdb.base/lineno-makeup.c                       |   35 
 testsuite/gdb.base/lineno-makeup.exp                     |   78 
 testsuite/gdb.base/macscp.exp                            |    8 
 testsuite/gdb.base/radix.exp                             |    7 
 testsuite/gdb.base/valgrind-attach.c                     |   28 
 testsuite/gdb.base/valgrind-attach.exp                   |   94 
 testsuite/gdb.base/valgrind-attach.sh                    |   20 
 testsuite/gdb.base/vla-overflow.c                        |   30 
 testsuite/gdb.base/vla-overflow.exp                      |  108 +
 testsuite/gdb.base/vla.c                                 |   55 
 testsuite/gdb.base/vla.exp                               |   62 
 testsuite/gdb.cp/cp-relocate.exp                         |    6 
 testsuite/gdb.cp/cplusfuncs.cc                           |    6 
 testsuite/gdb.cp/cplusfuncs.exp                          |  195 +
 testsuite/gdb.cp/expand-sals.exp                         |    2 
 testsuite/gdb.cp/member-ptr.cc                           |   17 
 testsuite/gdb.cp/member-ptr.exp                          |   34 
 testsuite/gdb.cp/namespace-multiple-imports.cc           |   20 
 testsuite/gdb.cp/namespace-multiple-imports.exp          |   49 
 testsuite/gdb.cp/namespace-nested-imports.cc             |   36 
 testsuite/gdb.cp/namespace-nested-imports.exp            |   57 
 testsuite/gdb.cp/namespace-no-imports.cc                 |   37 
 testsuite/gdb.cp/namespace-no-imports.exp                |   76 
 testsuite/gdb.cp/namespace-recursive.cc                  |   16 
 testsuite/gdb.cp/namespace-recursive.exp                 |   53 
 testsuite/gdb.cp/namespace-using.cc                      |  128 +
 testsuite/gdb.cp/namespace-using.exp                     |  130 +
 testsuite/gdb.cp/namespace.exp                           |   23 
 testsuite/gdb.cp/overload.exp                            |    8 
 testsuite/gdb.cp/ovldbreak.exp                           |   46 
 testsuite/gdb.cp/shadowing.cc                            |   48 
 testsuite/gdb.cp/shadowing.exp                           |   91 
 testsuite/gdb.dwarf2/callframecfa.S                      |  309 +++
 testsuite/gdb.dwarf2/callframecfa.exp                    |   55 
 testsuite/gdb.dwarf2/dw2-stripped.c                      |   42 
 testsuite/gdb.dwarf2/dw2-stripped.exp                    |   79 
 testsuite/gdb.dwarf2/dw2-struct-member-data-location.S   |   83 
 testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp |   37 
 testsuite/gdb.fortran/common-block.exp                   |  101 
 testsuite/gdb.fortran/common-block.f90                   |   67 
 testsuite/gdb.fortran/dwarf-stride.exp                   |   42 
 testsuite/gdb.fortran/dwarf-stride.f90                   |   40 
 testsuite/gdb.fortran/dynamic.exp                        |  158 +
 testsuite/gdb.fortran/dynamic.f90                        |   98 
 testsuite/gdb.fortran/logical.exp                        |   44 
 testsuite/gdb.fortran/logical.f90                        |   33 
 testsuite/gdb.fortran/string.exp                         |   72 
 testsuite/gdb.fortran/string.f90                         |   37 
 testsuite/gdb.gdb/selftest.exp                           |    4 
 testsuite/gdb.mi/gdb701.exp                              |    2 
 testsuite/gdb.mi/mi-var-display.exp                      |    4 
 testsuite/gdb.mi/mi2-var-display.exp                     |    4 
 testsuite/gdb.opt/array-from-register-func.c             |   22 
 testsuite/gdb.opt/array-from-register.c                  |   28 
 testsuite/gdb.opt/array-from-register.exp                |   33 
 testsuite/gdb.python/Makefile.in                         |    2 
 testsuite/gdb.python/python-cmd.exp                      |   27 
 testsuite/gdb.python/python-frame.exp                    |   48 
 testsuite/gdb.python/python-function.exp                 |   27 
 testsuite/gdb.python/python-inferior.c                   |   49 
 testsuite/gdb.python/python-inferior.exp                 |  201 +
 testsuite/gdb.python/python-infthread.c                  |   14 
 testsuite/gdb.python/python-infthread.exp                |   58 
 testsuite/gdb.python/python-mi.exp                       |   96 
 testsuite/gdb.python/python-prettyprint.c                |   13 
 testsuite/gdb.python/python-prettyprint.exp              |   11 
 testsuite/gdb.python/python-prettyprint.py               |   12 
 testsuite/gdb.python/python-template.exp                 |   25 
 testsuite/gdb.python/python-value.exp                    |   68 
 testsuite/gdb.python/python.exp                          |   27 
 testsuite/lib/cp-support.exp                             |    3 
 testsuite/lib/gdb.exp                                    |    1 
 testsuite/lib/mi-support.exp                             |   86 
 testsuite/lib/python-support.exp                         |   53 
 thread.c                                                 |   18 
 top.c                                                    |    1 
 typeprint.c                                              |   14 
 typeprint.h                                              |    3 
 ui-file.c                                                |   20 
 ui-file.h                                                |    6 
 utils.c                                                  |    7 
 valarith.c                                               |   45 
 valops.c                                                 |  254 ++
 valprint.c                                               |    3 
 value.c                                                  |  211 +-
 value.h                                                  |   12 
 varobj.c                                                 |  731 +++++--
 varobj.h                                                 |   32 
 xcoffread.c                                              |    1 
 220 files changed, 16562 insertions(+), 2661 deletions(-)

Index: gdb-archer.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-archer.patch,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -p -r1.21 -r1.22
--- gdb-archer.patch	11 Aug 2009 14:42:46 -0000	1.21
+++ gdb-archer.patch	11 Aug 2009 18:07:06 -0000	1.22
@@ -2,7 +2,7 @@ http://sourceware.org/gdb/wiki/ProjectAr
 http://sourceware.org/gdb/wiki/ArcherBranchManagement
 
 GIT snapshot:
-commit 81de3c6abae4f7e3738aa9bcc0ab2f8725cce252
+commit 93f5e942bdcdcc376ece452c309bedabae71def9
 
 branch `archer' - the merge of branches:
 archer-tromey-call-frame-cfa
@@ -3246,7 +3246,7 @@ index 4984f31..4bbbe4e 100644
  This observer is used for internal testing.  Do not use.  
  See testsuite/gdb.gdb/observer.exp.
 diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
-index 0f6da40..c1c162e 100644
+index 0f6da40..fc70309 100644
 --- a/gdb/dwarf2-frame.c
 +++ b/gdb/dwarf2-frame.c
 @@ -38,6 +38,7 @@
@@ -3271,7 +3271,18 @@ index 0f6da40..c1c162e 100644
  no_get_tls_address (void *baton, CORE_ADDR offset)
  {
    internal_error (__FILE__, __LINE__,
-@@ -360,14 +368,16 @@ execute_stack_op (gdb_byte *exp, ULONGEST len, int addr_size,
+@@ -352,24 +360,29 @@ execute_stack_op (gdb_byte *exp, ULONGEST len, int addr_size,
+ {
+   struct dwarf_expr_context *ctx;
+   CORE_ADDR result;
++  struct cleanup *old_chain;
+ 
+   ctx = new_dwarf_expr_context ();
++  old_chain = make_cleanup_free_dwarf_expr_context (ctx);
++
+   ctx->gdbarch = get_frame_arch (this_frame);
+   ctx->addr_size = addr_size;
+   ctx->baton = this_frame;
    ctx->read_reg = read_reg;
    ctx->read_mem = read_mem;
    ctx->get_frame_base = no_get_frame_base;
@@ -3287,9 +3298,12 @@ index 0f6da40..c1c162e 100644
      result = read_reg (this_frame, result);
 +  /* FIXME */
  
-   free_dwarf_expr_context (ctx);
+-  free_dwarf_expr_context (ctx);
++  do_cleanups (old_chain);
  
-@@ -1247,6 +1257,14 @@ dwarf2_frame_base_sniffer (struct frame_info *this_frame)
+   return result;
+ }
+@@ -1247,6 +1260,14 @@ dwarf2_frame_base_sniffer (struct frame_info *this_frame)
  
    return NULL;
  }
@@ -3297,14 +3311,14 @@ index 0f6da40..c1c162e 100644
 +CORE_ADDR
 +dwarf2_frame_cfa (struct frame_info *this_frame)
 +{
-+  if (! frame_base_is (this_frame, &dwarf2_frame_base))
++  if (! frame_unwinder_is (this_frame, &dwarf2_frame_unwind))
 +    error (_("can't compute CFA for this frame"));
-+  return get_frame_base_address (this_frame);
++  return get_frame_base (this_frame);
 +}
  
  const struct objfile_data *dwarf2_frame_objfile_data;
  
-@@ -1536,6 +1554,14 @@ dwarf2_frame_find_fde (CORE_ADDR *pc)
+@@ -1536,6 +1557,14 @@ dwarf2_frame_find_fde (CORE_ADDR *pc)
        CORE_ADDR offset;
        CORE_ADDR seek_pc;
  
@@ -3333,10 +3347,33 @@ index b203661..dd03d59 100644
 +
  #endif /* dwarf2-frame.h */
 diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c
-index 8dbf976..aec7b92 100644
+index 8dbf976..228eae7 100644
 --- a/gdb/dwarf2expr.c
 +++ b/gdb/dwarf2expr.c
-@@ -109,8 +109,7 @@ dwarf_expr_fetch (struct dwarf_expr_context *ctx, int n)
+@@ -61,6 +61,22 @@ free_dwarf_expr_context (struct dwarf_expr_context *ctx)
+   xfree (ctx);
+ }
+ 
++/* Helper for make_cleanup_free_dwarf_expr_context.  */
++
++static void
++free_dwarf_expr_context_cleanup (void *arg)
++{
++  free_dwarf_expr_context (arg);
++}
++
++/* Return a cleanup that calls free_dwarf_expr_context.  */
++
++struct cleanup *
++make_cleanup_free_dwarf_expr_context (struct dwarf_expr_context *ctx)
++{
++  return make_cleanup (free_dwarf_expr_context_cleanup, ctx);
++}
++
+ /* Expand the memory allocated to CTX's stack to contain at least
+    NEED more elements than are currently used.  */
+ 
+@@ -109,8 +125,7 @@ dwarf_expr_fetch (struct dwarf_expr_context *ctx, int n)
  
  /* Add a new piece to CTX's piece list.  */
  static void
@@ -3346,7 +3383,7 @@ index 8dbf976..aec7b92 100644
  {
    struct dwarf_expr_piece *p;
  
-@@ -125,9 +124,15 @@ add_piece (struct dwarf_expr_context *ctx,
+@@ -125,9 +140,15 @@ add_piece (struct dwarf_expr_context *ctx,
                             * sizeof (struct dwarf_expr_piece));
  
    p = &ctx->pieces[ctx->num_pieces - 1];
@@ -3364,7 +3401,7 @@ index 8dbf976..aec7b92 100644
  }
  
  /* Evaluate the expression at ADDR (LEN bytes long) using the context
-@@ -271,6 +276,21 @@ signed_address_type (struct gdbarch *gdbarch, int addr_size)
+@@ -271,6 +292,21 @@ signed_address_type (struct gdbarch *gdbarch, int addr_size)
      }
  }
  
@@ -3386,7 +3423,7 @@ index 8dbf976..aec7b92 100644
  /* The engine for the expression evaluator.  Using the context in CTX,
     evaluate the expression between OP_PTR and OP_END.  */
  
-@@ -279,8 +299,7 @@ execute_stack_op (struct dwarf_expr_context *ctx,
+@@ -279,8 +315,7 @@ execute_stack_op (struct dwarf_expr_context *ctx,
  		  gdb_byte *op_ptr, gdb_byte *op_end)
  {
    enum bfd_endian byte_order = gdbarch_byte_order (ctx->gdbarch);
@@ -3396,7 +3433,7 @@ index 8dbf976..aec7b92 100644
    ctx->initialized = 1;  /* Default is initialized.  */
  
    if (ctx->recursion_depth > ctx->max_recursion_depth)
-@@ -420,20 +439,36 @@ execute_stack_op (struct dwarf_expr_context *ctx,
+@@ -420,20 +455,36 @@ execute_stack_op (struct dwarf_expr_context *ctx,
  		   "used either alone or in conjuction with DW_OP_piece."));
  
  	  result = op - DW_OP_reg0;
@@ -3439,7 +3476,7 @@ index 8dbf976..aec7b92 100644
  	case DW_OP_breg0:
  	case DW_OP_breg1:
  	case DW_OP_breg2:
-@@ -498,11 +533,12 @@ execute_stack_op (struct dwarf_expr_context *ctx,
+@@ -498,11 +549,12 @@ execute_stack_op (struct dwarf_expr_context *ctx,
  	    (ctx->get_frame_base) (ctx->baton, &datastart, &datalen);
  	    dwarf_expr_eval (ctx, datastart, datalen);
  	    result = dwarf_expr_fetch (ctx, 0);
@@ -3454,7 +3491,7 @@ index 8dbf976..aec7b92 100644
  	  }
  	  break;
  	case DW_OP_dup:
-@@ -700,6 +736,10 @@ execute_stack_op (struct dwarf_expr_context *ctx,
+@@ -700,6 +752,10 @@ execute_stack_op (struct dwarf_expr_context *ctx,
  	  }
  	  break;
  
@@ -3465,7 +3502,7 @@ index 8dbf976..aec7b92 100644
  	case DW_OP_GNU_push_tls_address:
  	  /* Variable is at a constant offset in the thread-local
  	  storage block into the objfile for the current thread and
-@@ -738,12 +778,13 @@ execute_stack_op (struct dwarf_expr_context *ctx,
+@@ -738,12 +794,13 @@ execute_stack_op (struct dwarf_expr_context *ctx,
  
              /* Record the piece.  */
              op_ptr = read_uleb128 (op_ptr, op_end, &size);
@@ -3484,7 +3521,7 @@ index 8dbf976..aec7b92 100644
            }
            goto no_push;
  
-@@ -755,6 +796,13 @@ execute_stack_op (struct dwarf_expr_context *ctx,
+@@ -755,6 +812,13 @@ execute_stack_op (struct dwarf_expr_context *ctx,
  	  ctx->initialized = 0;
  	  goto no_push;
  
@@ -3499,7 +3536,7 @@ index 8dbf976..aec7b92 100644
  	  error (_("Unhandled dwarf expression opcode 0x%x"), op);
  	}
 diff --git a/gdb/dwarf2expr.h b/gdb/dwarf2expr.h
-index 7047922..232208d 100644
+index 7047922..597c2de 100644
 --- a/gdb/dwarf2expr.h
 +++ b/gdb/dwarf2expr.h
 @@ -23,6 +23,19 @@
@@ -3621,8 +3658,17 @@ index 7047922..232208d 100644
  
    /* The length of the piece, in bytes.  */
    ULONGEST size;
+@@ -131,6 +159,8 @@ struct dwarf_expr_piece
+ 
+ struct dwarf_expr_context *new_dwarf_expr_context (void);
+ void free_dwarf_expr_context (struct dwarf_expr_context *ctx);
++struct cleanup *
++    make_cleanup_free_dwarf_expr_context (struct dwarf_expr_context *ctx);
+ 
+ void dwarf_expr_push (struct dwarf_expr_context *ctx, CORE_ADDR value);
+ void dwarf_expr_pop (struct dwarf_expr_context *ctx);
 diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
-index 071b5ac..07bb8ba 100644
+index 071b5ac..7b2e488 100644
 --- a/gdb/dwarf2loc.c
 +++ b/gdb/dwarf2loc.c
 @@ -36,6 +36,7 @@
@@ -4004,7 +4050,20 @@ index 071b5ac..07bb8ba 100644
  /* Thread-local accesses do require a frame.  */
  static CORE_ADDR
  needs_frame_tls_address (void *baton, CORE_ADDR offset)
-@@ -356,11 +567,12 @@ dwarf2_loc_desc_needs_frame (gdb_byte *data, unsigned short size,
+@@ -346,21 +557,25 @@ dwarf2_loc_desc_needs_frame (gdb_byte *data, unsigned short size,
+   struct needs_frame_baton baton;
+   struct dwarf_expr_context *ctx;
+   int in_reg;
++  struct cleanup *old_chain;
+ 
+   baton.needs_frame = 0;
+ 
+   ctx = new_dwarf_expr_context ();
++  old_chain = make_cleanup_free_dwarf_expr_context (ctx);
++
+   ctx->gdbarch = get_objfile_arch (dwarf2_per_cu_objfile (per_cu));
+   ctx->addr_size = dwarf2_per_cu_addr_size (per_cu);
+   ctx->baton = &baton;
    ctx->read_reg = needs_frame_read_reg;
    ctx->read_mem = needs_frame_read_mem;
    ctx->get_frame_base = needs_frame_frame_base;
@@ -4018,7 +4077,7 @@ index 071b5ac..07bb8ba 100644
  
    if (ctx->num_pieces > 0)
      {
-@@ -369,7 +581,7 @@ dwarf2_loc_desc_needs_frame (gdb_byte *data, unsigned short size,
+@@ -369,11 +584,11 @@ dwarf2_loc_desc_needs_frame (gdb_byte *data, unsigned short size,
        /* If the location has several pieces, and any of them are in
           registers, then we will need a frame to fetch them from.  */
        for (i = 0; i < ctx->num_pieces; i++)
@@ -4027,7 +4086,12 @@ index 071b5ac..07bb8ba 100644
            in_reg = 1;
      }
  
-@@ -601,7 +813,7 @@ static int
+-  free_dwarf_expr_context (ctx);
++  do_cleanups (old_chain);
+ 
+   return baton.needs_frame || in_reg;
+ }
+@@ -601,7 +816,7 @@ static int
  loclist_describe_location (struct symbol *symbol, struct ui_file *stream)
  {
    /* FIXME: Could print the entire list of locations.  */
@@ -4036,7 +4100,7 @@ index 071b5ac..07bb8ba 100644
    return 1;
  }
  
-@@ -617,16 +829,56 @@ loclist_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch,
+@@ -617,16 +832,56 @@ loclist_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch,
  
    data = find_location_expression (dlbaton, &size, ax->scope);
    if (data == NULL)
@@ -8250,7 +8314,7 @@ index 8c027c9..d201f76 100644
    else
      {
 diff --git a/gdb/frame.c b/gdb/frame.c
-index 67e0607..1eb7f9d 100644
+index 67e0607..49c3013 100644
 --- a/gdb/frame.c
 +++ b/gdb/frame.c
 @@ -1109,6 +1109,14 @@ has_stack_frames (void)
@@ -8268,7 +8332,7 @@ index 67e0607..1eb7f9d 100644
    /* Don't try to read from a dead thread.  */
    if (is_exited (inferior_ptid))
      return 0;
-@@ -1843,6 +1851,17 @@ get_frame_args_address (struct frame_info *fi)
+@@ -1843,6 +1851,15 @@ get_frame_args_address (struct frame_info *fi)
    return fi->base->this_args (fi, &fi->base_cache);
  }
  
@@ -8276,28 +8340,27 @@ index 67e0607..1eb7f9d 100644
 +   otherwise.  */
 +
 +int
-+frame_base_is (struct frame_info *fi, const struct frame_base *base)
++frame_unwinder_is (struct frame_info *fi, const struct frame_unwind *unwinder)
 +{
-+  if (fi->base == NULL)
-+    fi->base = frame_base_find_by_frame (fi);
-+  return fi->base == base;
++  return fi->unwind == unwinder;
 +}
 +
  /* Level of the selected frame: 0 for innermost, 1 for its caller, ...
     or -1 for a NULL frame.  */
  
 diff --git a/gdb/frame.h b/gdb/frame.h
-index febef5c..09bf628 100644
+index febef5c..611c6d3 100644
 --- a/gdb/frame.h
 +++ b/gdb/frame.h
-@@ -696,4 +696,9 @@ extern struct frame_info *deprecated_safe_get_selected_frame (void);
+@@ -696,4 +696,10 @@ extern struct frame_info *deprecated_safe_get_selected_frame (void);
  
  extern struct frame_info *create_new_frame (CORE_ADDR base, CORE_ADDR pc);
  
-+/* Return true if the frame base for frame FI is BASE; false
++/* Return true if the frame unwinder for frame FI is UNWINDER; false
 +   otherwise.  */
 +
-+extern int frame_base_is (struct frame_info *fi, const struct frame_base *base);
++extern int frame_unwinder_is (struct frame_info *fi,
++			      const struct frame_unwind *unwinder);
 +
  #endif /* !defined (FRAME_H)  */
 diff --git a/gdb/gdbinit.in b/gdb/gdbinit.in
@@ -21677,6 +21740,382 @@ index 0000000..6922eed
 +if [test_compiler_info gcc-4-3-*] then { setup_xfail *-*-* }
 +
 +gdb_test "print x" "= 11" "Print imported namespace x"
+diff --git a/gdb/testsuite/gdb.dwarf2/callframecfa.S b/gdb/testsuite/gdb.dwarf2/callframecfa.S
+new file mode 100644
+index 0000000..6d0421a
+--- /dev/null
++++ b/gdb/testsuite/gdb.dwarf2/callframecfa.S
+@@ -0,0 +1,309 @@
++/*
++   Copyright 2009 Free Software Foundation, Inc.
++
++   This program is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by
++   the Free Software Foundation; either version 3 of the License, or
++   (at your option) any later version.
++
++   This program is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++   GNU General Public License for more details.
++
++   You should have received a copy of the GNU General Public License
++   along with this program.  If not, see <http://www.gnu.org/licenses/>.
++ */
++
++/* This was compiled from a trivial program just to test the
++   DW_OP_call_frame_cfa operator:
++
++    int func (int arg) {
++      return arg + 23;
++    }
++
++    int main(int argc, char *argv[]) {
++      func (77);
++    }
++*/
++
++	.file	"q.c"
++	.section	.debug_abbrev,"", at progbits
++.Ldebug_abbrev0:
++	.section	.debug_info,"", at progbits
++.Ldebug_info0:
++	.section	.debug_line,"", at progbits
++.Ldebug_line0:
++	.text
++.Ltext0:
++.globl func
++	.type	func, @function
++func:
++.LFB0:
++	.file 1 "q.c"
++	.loc 1 2 0
++	.cfi_startproc
++	pushl	%ebp
++	.cfi_def_cfa_offset 8
++	movl	%esp, %ebp
++	.cfi_offset 5, -8
++	.cfi_def_cfa_register 5
++	.loc 1 3 0
++	movl	8(%ebp), %eax
++	addl	$23, %eax
++	.loc 1 4 0
++	popl	%ebp
++	.cfi_restore 5
++	.cfi_def_cfa 4, 4
++	ret
++	.cfi_endproc
++.LFE0:
++	.size	func, .-func
++.globl _start
++	.type	_start, @function
++_start:
++.LFB1:
++	.loc 1 6 0
++	.cfi_startproc
++	pushl	%ebp
++	.cfi_def_cfa_offset 8
++	movl	%esp, %ebp
++	.cfi_offset 5, -8
++	.cfi_def_cfa_register 5
++	subl	$4, %esp
++	.loc 1 7 0
++	movl	$77, (%esp)
++	call	func
++	.loc 1 8 0
++	leave
++	.cfi_restore 5
++	.cfi_def_cfa 4, 4
++	ret
++	.cfi_endproc
++.LFE1:
++	.size	_start, .-_start
++.Letext0:
++	.section	.debug_info
++	.long	0x9e
++	.value	0x3
++	.long	.Ldebug_abbrev0
++	.byte	0x4
++	.uleb128 0x1
++	.long	.LASF5
++	.byte	0x1
++	.string	"q.c"
++	.long	.LASF6
++	.long	.Ltext0
++	.long	.Letext0
++	.long	.Ldebug_line0
++	.uleb128 0x2
++	.byte	0x1
++	.long	.LASF0
++	.byte	0x1
++	.byte	0x1
++	.byte	0x1
++	.long	0x4f
++	.long	.LFB0
++	.long	.LFE0
++	.byte	0x1
++	.byte	0x9c
++	.long	0x4f
++	.uleb128 0x3
++	.string	"arg"
++	.byte	0x1
++	.byte	0x1
++	.long	0x4f
++	.byte	0x2
++	.byte	0x91
++	.sleb128 0
++	.byte	0x0
++	.uleb128 0x4
++	.byte	0x4
++	.byte	0x5
++	.string	"int"
++	.uleb128 0x2
++	.byte	0x1
++	.long	.LASF1
++	.byte	0x1
++	.byte	0x6
++	.byte	0x1
++	.long	0x4f
++	.long	.LFB1
++	.long	.LFE1
++	.byte	0x1
++	.byte	0x9c
++	.long	0x8e
++	.uleb128 0x5
++	.long	.LASF2
++	.byte	0x1
++	.byte	0x6
++	.long	0x4f
++	.byte	0x2
++	.byte	0x91
++	.sleb128 0
++	.uleb128 0x5
++	.long	.LASF3
++	.byte	0x1
++	.byte	0x6
++	.long	0x8e
++	.byte	0x2
++	.byte	0x91
++	.sleb128 4
++	.byte	0x0
++	.uleb128 0x6
++	.byte	0x4
++	.long	0x94
++	.uleb128 0x6
++	.byte	0x4
++	.long	0x9a
++	.uleb128 0x7
++	.byte	0x1
++	.byte	0x6
++	.long	.LASF4
++	.byte	0x0
++	.section	.debug_abbrev
++	.uleb128 0x1
++	.uleb128 0x11
++	.byte	0x1
++	.uleb128 0x25
++	.uleb128 0xe
++	.uleb128 0x13
++	.uleb128 0xb
++	.uleb128 0x3
++	.uleb128 0x8
++	.uleb128 0x1b
++	.uleb128 0xe
++	.uleb128 0x11
++	.uleb128 0x1
++	.uleb128 0x12
++	.uleb128 0x1
++	.uleb128 0x10
++	.uleb128 0x6
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0x2
++	.uleb128 0x2e
++	.byte	0x1
++	.uleb128 0x3f
++	.uleb128 0xc
++	.uleb128 0x3
++	.uleb128 0xe
++	.uleb128 0x3a
++	.uleb128 0xb
++	.uleb128 0x3b
++	.uleb128 0xb
++	.uleb128 0x27
++	.uleb128 0xc
++	.uleb128 0x49
++	.uleb128 0x13
++	.uleb128 0x11
++	.uleb128 0x1
++	.uleb128 0x12
++	.uleb128 0x1
++	.uleb128 0x40
++	.uleb128 0xa
++	.uleb128 0x1
++	.uleb128 0x13
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0x3
++	.uleb128 0x5
++	.byte	0x0
++	.uleb128 0x3
++	.uleb128 0x8
++	.uleb128 0x3a
++	.uleb128 0xb
++	.uleb128 0x3b
++	.uleb128 0xb
++	.uleb128 0x49
++	.uleb128 0x13
++	.uleb128 0x2
++	.uleb128 0xa
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0x4
++	.uleb128 0x24
++	.byte	0x0
++	.uleb128 0xb
++	.uleb128 0xb
++	.uleb128 0x3e
++	.uleb128 0xb
++	.uleb128 0x3
++	.uleb128 0x8
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0x5
++	.uleb128 0x5
++	.byte	0x0
++	.uleb128 0x3
++	.uleb128 0xe
++	.uleb128 0x3a
++	.uleb128 0xb
++	.uleb128 0x3b
++	.uleb128 0xb
++	.uleb128 0x49
++	.uleb128 0x13
++	.uleb128 0x2
++	.uleb128 0xa
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0x6
++	.uleb128 0xf
++	.byte	0x0
++	.uleb128 0xb
++	.uleb128 0xb
++	.uleb128 0x49
++	.uleb128 0x13
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0x7
++	.uleb128 0x24
++	.byte	0x0
++	.uleb128 0xb
++	.uleb128 0xb
++	.uleb128 0x3e
++	.uleb128 0xb
++	.uleb128 0x3
++	.uleb128 0xe
++	.byte	0x0
++	.byte	0x0
++	.byte	0x0
++	.section	.debug_pubnames,"", at progbits
++	.long	0x20
++	.value	0x2
++	.long	.Ldebug_info0
++	.long	0xa2
++	.long	0x25
++	.string	"func"
++	.long	0x56
++	.string	"main"
++	.long	0x0
++	.section	.debug_aranges,"", at progbits
++	.long	0x1c
++	.value	0x2
++	.long	.Ldebug_info0
++	.byte	0x4
++	.byte	0x0
++	.value	0x0
++	.value	0x0
++	.long	.Ltext0
++	.long	.Letext0-.Ltext0
++	.long	0x0
++	.long	0x0
++	.section	.debug_str,"MS", at progbits,1
++.LASF5:
++	.string	"GNU C 4.5.0 20090810 (experimental) [trunk revision 150633]"
++.LASF2:
++	.string	"argc"
++.LASF6:
++	.string	"/tmp"
++.LASF0:
++	.string	"func"
++.LASF3:
++	.string	"argv"
++.LASF1:
++	.string	"main"
++.LASF4:
++	.string	"char"
++	.ident	"GCC: (GNU) 4.5.0 20090810 (experimental) [trunk revision 150633]"
++	.section	.note.GNU-stack,"", at progbits
+diff --git a/gdb/testsuite/gdb.dwarf2/callframecfa.exp b/gdb/testsuite/gdb.dwarf2/callframecfa.exp
+new file mode 100644
+index 0000000..00d67fc
+--- /dev/null
++++ b/gdb/testsuite/gdb.dwarf2/callframecfa.exp
+@@ -0,0 +1,55 @@
++# Copyright 2009 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program.  If not, see <http://www.gnu.org/licenses/>.
++
++# Test DW_OP_call_frame_cfa.
++
++# This test can only be run on targets which support DWARF-2 and use gas.
++# For now pick a sampling of likely targets.
++if {![istarget *-*-linux*]
++    && ![istarget *-*-gnu*]
++    && ![istarget *-*-elf*]
++    && ![istarget *-*-openbsd*]
++    && ![istarget arm-*-eabi*]
++    && ![istarget powerpc-*-eabi*]} {
++    return 0  
++}
++# This test can only be run on x86 targets.
++if {![istarget i?86-*]} {
++    return 0  
++}
++
++set testfile "callframecfa"
++set srcfile ${testfile}.S
++set binfile ${objdir}/${subdir}/${testfile}.x
++
++if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
++       [list {additional_flags=-nostdlib}]] != "" } {
++    return -1
++}
++
++gdb_exit
++gdb_start
++gdb_reinitialize_dir $srcdir/$subdir
++gdb_load ${binfile}
++
++gdb_test "break *func" "Breakpoint 1.*" "set breakpoint for call-frame-cfa"
++gdb_test "run" "" "run for call-frame-cfa"
++gdb_test "display arg" "arg = 77" "set display for call-frame-cfa"
++
++# We know how many instructions are in the function.  Note that we
++# can't handle the "ret" instruction due to the epilogue unwinder.
++for {set i 1} {$i < 5} {incr i} {
++    gdb_test "si" "arg = 77" "step $i for call-frame-cfa"
++}
 diff --git a/gdb/testsuite/gdb.dwarf2/dw2-stripped.c b/gdb/testsuite/gdb.dwarf2/dw2-stripped.c
 new file mode 100644
 index 0000000..1f02d90


Index: gdb.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb.spec,v
retrieving revision 1.371
retrieving revision 1.372
diff -u -p -r1.371 -r1.372
--- gdb.spec	11 Aug 2009 14:42:47 -0000	1.371
+++ gdb.spec	11 Aug 2009 18:07:06 -0000	1.372
@@ -14,7 +14,7 @@ Version: 6.8.50.20090811
 
 # The release always contains a leading reserved number, start it at 1.
 # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
-Release: 1%{?_with_upstream:.upstream}%{?dist}
+Release: 2%{?_with_upstream:.upstream}%{?dist}
 
 License: GPLv3+
 Group: Development/Debuggers
@@ -825,6 +825,10 @@ fi
 %endif
 
 %changelog
+* Tue Aug 11 2009 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.8.50.20090811-2
+- archer-jankratochvil-fedora12 commit: 93f5e942bdcdcc376ece452c309bedabae71def9
+- Fix "can't compute CFA for this frame" (by Tom Tromey, BZ 516627).
+
 * Tue Aug 11 2009 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.8.50.20090811-1
 - Support constant DW_AT_data_member_location by GCC PR debug/40659 (BZ 515377).
 - Fix .spec URL.




More information about the scm-commits mailing list