This is the mail archive of the gdb-patches@sources.redhat.com 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: [PATCH] Step over Objective-C dispatch function


+CORE_ADDR +skip_language_trampoline (CORE_ADDR pc)
+{
+  int i;
+  CORE_ADDR real_pc = 0;
+
+  for (i = 0; i < languages_size; i++)
+    {
+      if (languages[i]->skip_trampoline)
+    {
+      real_pc = (languages[i]->skip_trampoline)(pc);
+      if (real_pc)
+        break;
+    }
+    }
+
+  return real_pc;

Return 0. Otherwize, the old SKIP_TRAMPOLINE_CODE() won't kick in.

Actually, never mind. Although:


	CORE_ADDR real_pc = ...
	if (real_pc)
	  return real_pc;

...

return 0;

might be easier to read.

Andrew




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