This is the mail archive of the gdb@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]

Re: How to call operator<< functions?


On Wed, Aug 30, 2006 at 11:05:43PM +0300, Michael Veksler wrote:
> Should I open a PR, or several PRs?
> Maybe someone else that can split my single test case into subtopics, 
> each to fit its own PR?
> Does it make sense to create test case for the missing 50% of the 
> crashes I have seen, or will it be better to wait and see if they get 
> fixed by other PRs?

Let's look at one thing at a time.

The first two crashes should, I think, be addressed by this patch. 
Could you try it?

Some of the later crashes are caused by this:

(gdb) set $a = x.Print
(gdb) p $a
$7 = <error reading variable>

I have a whole lot of patches related to member functions, that I
haven't had time to merge yet - and I would not like to look at this
until I've done that.

-- 
Daniel Jacobowitz
CodeSourcery

2006-08-30  Daniel Jacobowitz  <dan@codesourcery.com>

	* infcall.c (call_function_by_hand): Check for function pointer
	types.

Index: src/gdb/infcall.c
===================================================================
--- src.orig/gdb/infcall.c	2006-08-30 16:19:00.000000000 -0400
+++ src/gdb/infcall.c	2006-08-30 16:18:43.000000000 -0400
@@ -337,6 +337,9 @@ call_function_by_hand (struct value *fun
   struct cleanup *caller_regcache_cleanup;
   struct frame_id dummy_id;
 
+  if (TYPE_CODE (ftype) == TYPE_CODE_PTR)
+    ftype = check_typedef (TYPE_TARGET_TYPE (ftype));
+
   if (!target_has_execution)
     noprocess ();
 


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