Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Simon Marchi <simon.marchi@ericsson.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Make target_read_alloc & al return vectors
Date: Mon, 16 Apr 2018 20:04:00 -0000	[thread overview]
Message-ID: <8b2d798a-9383-4f98-0248-6a1a8d4fa1a2@redhat.com> (raw)
In-Reply-To: <1521691401-21512-1-git-send-email-simon.marchi@ericsson.com>

Hi Simon,

I noticed this recent regression:

 PASS: gdb.threads/gcore-stale-thread.exp: successfully compiled posix threads test case
 PASS: gdb.threads/gcore-stale-thread.exp: set non-stop on
 PASS: gdb.threads/gcore-stale-thread.exp: continue to breakpoint: break-here
-PASS: gdb.threads/gcore-stale-thread.exp: save a corefile
+UNSUPPORTED: gdb.threads/gcore-stale-thread.exp: save a corefile
 PASS: gdb.threads/gcore-stale-thread.exp: exited thread is current due to non-stop

and bisection points at:
 9018be22e02 ("Make target_read_alloc & al return vectors")

diff of gdb.log shows:

 gcore gdb/testsuite/outputs/gdb.threads/gcore-stale-thread/gcore-stale-thread.core
-Saved corefile gdb/testsuite/outputs/gdb.threads/gcore-stale-thread/gcore-stale-thread.core
-(gdb) PASS: gdb.threads/gcore-stale-thread.exp: save a corefile
+Target does not support core file generation.
+(gdb) UNSUPPORTED: gdb.threads/gcore-stale-thread.exp: save a corefile

Thanks,
Pedro Alves

On 03/22/2018 04:03 AM, Simon Marchi wrote:
> This patch started by changing target_read_alloc_1 to return a
> byte_vector, to avoid manual memory management (in target_read_alloc_1
> and in the callers).  To communicate failures to the callers, it
> actually returns a gdb::optional<gdb::byte_vector>.
> 
> Adjusting target_read_stralloc was a bit more tricky, since it wants to
> return a buffer of char, and not gdb_byte.  Since you can't just cast a
> gdb::byte_vector into a gdb::def_vector<char>, I made
> target_read_alloc_1 templated, so both versions (that return vectors of
> gdb_byte and char) are generated.  Since target_read_stralloc now
> returns a gdb::char_vector instead of a gdb::unique_xmalloc_ptr<char>, a
> few callers need to be adjusted.


  parent reply	other threads:[~2018-04-16 20:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-22  4:03 Simon Marchi
2018-04-07 17:21 ` Simon Marchi
2018-04-16 20:04 ` Pedro Alves [this message]
2018-04-16 20:51   ` [pushed] linux_spu_make_corefile_notes: return note_data instead of nullptr (was: [PATCH] Make target_read_alloc & al return vectors) Simon Marchi
2018-07-07  8:54 ` [PATCH] Make target_read_alloc & al return vectors Andreas Schwab
2018-07-07 15:10   ` Simon Marchi
2018-07-07 15:17     ` Simon Marchi
2018-07-07 19:32       ` Andreas Schwab
2018-07-07 17:23     ` Andreas Schwab
2018-07-07 17:58       ` Simon Marchi
2018-07-07 18:24         ` Andreas Schwab
2018-07-16 18:02     ` 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=8b2d798a-9383-4f98-0248-6a1a8d4fa1a2@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@ericsson.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