public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@gnu.org>
To: gdb-patches@sourceware.org
Cc: Thomas Schwinge <thomas@codesourcery.com>,
	thomas@schwinge.name, bug-hurd@gnu.org
Subject: [PATCH 3/5] hurd: make function cast stronger
Date: Fri, 29 May 2020 22:04:44 +0200	[thread overview]
Message-ID: <20200529200444.3mc4bw2nqep3d4oh@function> (raw)
In-Reply-To: <20200529200247.ldtwyly6jepcdpuc@function>

gdb/ChangeLog: 

2020-05-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* reply_mig_hack.awk (Error return): Cast function through
	void *, to bypass compiler function call check.

diff --git a/gdb/reply_mig_hack.awk b/gdb/reply_mig_hack.awk
index 52ab90bba3..6ff683a841 100644
--- a/gdb/reply_mig_hack.awk
+++ b/gdb/reply_mig_hack.awk
@@ -130,7 +130,8 @@ parse_phase == 5 && /^#if[ \t]TypeCheck/ {
   # two arguments.
   # This is possibly bogus, but easier than supplying bogus values for all
   # the other args (we can't just pass 0 for them, as they might not be scalar).
-  print "\t    OutP->RetCode = (*(kern_return_t (*)(mach_port_t, kern_return_t)) " user_function_name ") (In0P->Head.msgh_request_port, In0P->" arg_name[0] ");";
+  print "\t    void * __error_call = " user_function_name ";";
+  print "\t    OutP->RetCode = (*(kern_return_t (*)(mach_port_t, kern_return_t)) __error_call) (In0P->Head.msgh_request_port, In0P->" arg_name[0] ");";
   print "\t    return;";
   print "\t  }";
   print "";

  reply	other threads:[~2020-05-29 20:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-29 20:01 [PATCH 1/5] hurd: fix gnu_debug_flag type Samuel Thibault
2020-05-29 20:02 ` [PATCH 2/5] hurd: add missing awk script dependency Samuel Thibault
2020-05-29 20:04   ` Samuel Thibault [this message]
2020-05-29 20:07     ` [PATCH 4/5] hurd: add gnu_target pointer to fix thread API calls Samuel Thibault
2020-05-29 20:09       ` [PATCH 5/5] hurd: remove unused variables Samuel Thibault
2020-05-29 20:44 ` [PATCH 1/5] hurd: fix gnu_debug_flag type Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200529200444.3mc4bw2nqep3d4oh@function \
    --to=samuel.thibault@gnu.org \
    --cc=bug-hurd@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=thomas@codesourcery.com \
    --cc=thomas@schwinge.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).