From: Simon Marchi Date: Tue, 28 Sep 2021 23:47:44 +0000 (-0400) Subject: gdb: fix darwin-nat build X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8c12140439effb70a6c05c58846aeaef91d44350;p=binutils-gdb.git gdb: fix darwin-nat build There are two errors of this kind: CXX darwin-nat.o /Users/smarchi/src/binutils-gdb/gdb/darwin-nat.c:1175:19: error: format specifies type 'unsigned long' but the argument has type 'ULONGEST' (aka 'unsigned long long') [-Werror,-Wformat] ptid.pid (), ptid.tid ()); ^~~~~~~~~~~ Fix them by using ptid_t's to_string method. Change-Id: I52087d5f7ee0fc01ac8b3f87d4db0217cb0d7cc7 --- diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c index 84558bfc132..f7827b22518 100644 --- a/gdb/darwin-nat.c +++ b/gdb/darwin-nat.c @@ -906,8 +906,8 @@ darwin_nat_target::resume (ptid_t ptid, int step, enum gdb_signal signal) int nsignal; inferior_debug - (2, _("darwin_resume: pid=%d, tid=0x%lx, step=%d, signal=%d\n"), - ptid.pid (), ptid.tid (), step, signal); + (2, _("darwin_resume: ptid=%s, step=%d, signal=%d\n"), + ptid.to_string ().c_str (), step, signal); if (signal == GDB_SIGNAL_0) nsignal = 0; @@ -1171,8 +1171,8 @@ darwin_nat_target::wait_1 (ptid_t ptid, struct target_waitstatus *status) darwin_thread_t *thread; inferior_debug - (2, _("darwin_wait: waiting for a message pid=%d thread=%lx\n"), - ptid.pid (), ptid.tid ()); + (2, _("darwin_wait: waiting for a message ptid=%s thread=%lx\n"), + ptid.to_string ().c_str ()); /* Handle fake stop events at first. */ if (darwin_inf_fake_stop != NULL)