Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Walfred Tedeschi <walfred.tedeschi@intel.com>,
	       "Simon Marchi; gdb-patches"@sourceware.org,
	       gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 0/1] Build GDB as a C++ program by default
Date: Wed, 20 Apr 2016 19:56:00 -0000	[thread overview]
Message-ID: <5717DED3.9020107@redhat.com> (raw)
In-Reply-To: <57164CA9.6080401@intel.com>

On 04/19/2016 04:20 PM, Walfred Tedeschi wrote:
> Am 4/19/2016 um 4:39 PM schrieb Pedro Alves:
>> On 04/19/2016 03:36 PM, Walfred Tedeschi wrote:
>>
>>> Pedro,
>>>
>>> Do you have some data about building GDB on OsX with
>>> --enable-build-with-cxx?
>>>
>>> If not I could give it a try!
>>
>> Please do give it a try.  Thanks!
>>
> 
> There is some issues, i will investigating a bit further.
> By now i was compiling with Clang, will also try to compile with gcc.

I managed to build a linux x darwin cross compiler here, using the
osxcross tool.

Indeed, clang++ stumbles on a bunch of issues.  But then again, so
does clang in C-mode.

With gcc/g++ (5.3.0), and I see a few warnings/errors.  Configuring gdb with:

/home/pedro/gdb/mygit/cxx-convertion/src/configure --host=x86_64-apple-darwin15 CFLAGS="-g3 -O0" CXXFLAGS="-g3 -O0" --enable-build-with-cxx=no --enable-targets=all --disable-ld --disable-binutils --disable-gas

First off, I see a set of:

/home/pedro/gdb/mygit/cxx-convertion/src/gdb/main.c:486:27: warning: 'void* sbrk(int)' is deprecated [-Wdeprecated-declarations]
lim_at_start = (char *) sbrk (0);
^

but I get that in C-mode too, so I'll ignore.

So, compiling with:

$ make -k WERROR_CFLAGS="-Wno-deprecated-declarations" 2>diagnostics.txt 1>/dev/null

I see just a few warnings / errors, and they all look easily fixable:

/home/pedro/gdb/mygit/cxx-convertion/src/gdb/aarch64-tdep.c: In function 'unsigned int aarch64_record_load_store(insn_decode_record*)':
/home/pedro/gdb/mygit/cxx-convertion/src/gdb/aarch64-tdep.c:3479:78: error: invalid conversion from 'uint64_t* {aka long long unsigned int*}' to 'ULONGEST* {aka long unsigned int*}' [-fpermissive]
                      bits (aarch64_insn_r->aarch64_insn, 16, 20), &reg_rm_val);

/home/pedro/gdb/mygit/cxx-convertion/src/gdb/darwin-nat.c: In function 'void darwin_resume_thread(inferior*, darwin_thread_t*, int, int)':
/home/pedro/gdb/mygit/cxx-convertion/src/gdb/darwin-nat.c:731:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    (caddr_t)thread->gdb_port, nsignal);
                     ^

/home/pedro/gdb/mygit/cxx-convertion/src/gdb/darwin-nat.c: In function 'ptid_t darwin_decode_message(mach_msg_header_t*, darwin_thread_t**, inferior**, target_waitstatus*)':
/home/pedro/gdb/mygit/cxx-convertion/src/gdb/darwin-nat.c:1016:25: error: invalid conversion from 'int' to 'gdb_signal' [-fpermissive]
     status->value.sig = WTERMSIG (wstatus);

/home/pedro/gdb/mygit/cxx-convertion/src/gdb/darwin-nat.c: In function 'void darwin_resume_thread(inferior*, darwin_thread_t*, int, int)':
/home/pedro/gdb/mygit/cxx-convertion/src/gdb/darwin-nat.c:731:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    (caddr_t)thread->gdb_port, nsignal);
                     ^

I'll send patches later.

Thanks,
Pedro Alves


  reply	other threads:[~2016-04-20 19:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-18 17:27 Pedro Alves
2016-04-18 17:27 ` [PATCH 1/1] " Pedro Alves
2016-04-19  7:34   ` Yao Qi
2016-04-19 13:34 ` [PATCH 0/1] " Simon Marchi
2016-04-19 14:18   ` Pedro Alves
2016-04-19 14:48     ` Eli Zaretskii
2016-04-19 15:03       ` Pedro Alves
2016-04-19 15:23         ` Eli Zaretskii
2016-04-19 15:40           ` Pedro Alves
2016-04-19 15:59             ` Eli Zaretskii
2016-04-19 16:20               ` Pedro Alves
2016-04-19 16:31               ` Eli Zaretskii
2016-04-19 15:41       ` Simon Marchi
2016-04-19 16:32         ` Eli Zaretskii
     [not found]     ` <AC542571535E904D8E8ADAE745D60B19445B1C11@IRSMSX104.ger.corp.intel.com>
     [not found]       ` <5716425B.3050707@intel.com>
     [not found]         ` <57164325.8020408@redhat.com>
2016-04-19 15:20           ` Walfred Tedeschi
2016-04-20 19:56             ` Pedro Alves [this message]
2016-04-20 22:16               ` Pedro Alves
2016-04-21 15:18               ` John Baldwin
2016-04-21 16:41                 ` Pedro Alves
2016-04-19 15:47     ` Simon Marchi
2016-04-19 15:50       ` Pedro Alves
2016-04-20 22:27     ` Pedro Alves

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=5717DED3.9020107@redhat.com \
    --to=palves@redhat.com \
    --cc="Simon Marchi; gdb-patches"@sourceware.org \
    --cc=gdb-patches@sourceware.org \
    --cc=walfred.tedeschi@intel.com \
    /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