linux-user/elfload: fix filling psinfo->pr_psargs
commit5f779a3a26a9dcc8072d909b7759bb9fade097a9
authorIlya Leoshkevich <iii@linux.ibm.com>
Tue, 13 Apr 2021 20:58:14 +0000 (13 22:58 +0200)
committerLaurent Vivier <laurent@vivier.eu>
Tue, 18 May 2021 05:10:46 +0000 (18 07:10 +0200)
tree63205ba4ec84af2174e6dcdc6ecf8f7e1e68294b
parentfb80439b1ede60d214ae5bbacc29b137a89b9e72
linux-user/elfload: fix filling psinfo->pr_psargs

The current code dumps the memory between arg_start and arg_end,
which contains the argv pointers. This results in the

    Core was generated by `<garbage>`

message when opening the core file in GDB. This is because the code is
supposed to dump the actual arg strings. Fix by using arg_strings and
env_strings instead of arg_start and arg_end.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20210413205814.22821-1-iii@linux.ibm.com>
[lv: add missing braces]
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/elfload.c