Re: CVS commit: src/external/gpl3/gdb/dist/gdb

2023-08-17 Thread Rin Okuyama
> For vax, something still wrong.

This was due to my test environment built by GCC 12. For system built by GCC 10,
GDB 13 works just fine (except for C++ exception handling), as far as I can see.

Thanks,
rin

On Thu, Aug 17, 2023 at 4:45 PM Rin Okuyama  wrote:
>
> Module Name:src
> Committed By:   rin
> Date:   Thu Aug 17 07:45:11 UTC 2023
>
> Modified Files:
> src/external/gpl3/gdb/dist/gdb: configure.tgt
>
> Log Message:
> gdb/vax and ia64: Add missing tdep files for NetBSD
>
> They are also missing for gdb 11.
>
> XXX
> For vax, something still wrong. For ia64, compile test only.
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.30 -r1.31 src/external/gpl3/gdb/dist/gdb/configure.tgt
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
>


Re: CVS commit: src/external/gpl3/gdb/dist/gdb

2023-08-16 Thread Rin Okuyama
> gcc/ppc: Register NetBSD OSABI for rs6000, lost during merge

oops, apparently "gdb/ppc", not "gcc".

Thanks,
rin

On Thu, Aug 17, 2023 at 2:53 PM Rin Okuyama  wrote:
>
> Module Name:src
> Committed By:   rin
> Date:   Thu Aug 17 05:53:45 UTC 2023
>
> Modified Files:
> src/external/gpl3/gdb/dist/gdb: ppc-netbsd-tdep.c
>
> Log Message:
> gcc/ppc: Register NetBSD OSABI for rs6000, lost during merge
>
> Otherwise, OSABI is undetermined until executable is loaded.
>
> Add comments also.
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/ppc-netbsd-tdep.c
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
>


Re: CVS commit: src/external/gpl3/gdb/dist/gdb

2020-12-10 Thread Kamil Rytarowski
On 10.12.2020 08:14, Rin Okuyama wrote:
> Module Name:  src
> Committed By: rin
> Date: Thu Dec 10 07:14:58 UTC 2020
> 
> Modified Files:
>   src/external/gpl3/gdb/dist/gdb: nbsd-nat.c
> 
> Log Message:
> Fix arm, for which PT_STEP is defined but unimplemented.
> 
> XXX
> Stop exposing PT_STEP to userland for arm?
> 


Yes, please remove it from headers for arm. This was a hack for DTrace
as far as I recall, to expose PT_STEP that way and get DTrace building.

Then, please restore nbsd-nat.c to the previous state.



signature.asc
Description: OpenPGP digital signature


Re: CVS commit: src/external/gpl3/gdb/dist/gdb

2020-10-14 Thread Christos Zoulas
Thanks for fixing it!

christos


signature.asc
Description: Message signed with OpenPGP


Re: CVS commit: src/external/gpl3/gdb/dist/gdb

2020-10-14 Thread Kamil Rytarowski
On 13.10.2020 11:14, Leonardo Taccari wrote:
> Hello Kamil,
> 
> Kamil Rytarowski writes:
>> Module Name: src
>> Committed By:kamil
>> Date:Tue Oct  6 23:14:47 UTC 2020
>>
>> Modified Files:
>>  src/external/gpl3/gdb/dist/gdb: inf-ptrace.c nbsd-nat.c
>>
>> Log Message:
>> Undo local patches
>>
>> They are no longer needed (and are wrong).
>> [...]
> 
> This seems to break gdb, e.g. by starting debugging sleep(1):
> 
>  | % gdb sleep
>  | Reading symbols from sleep...
>  | Reading symbols from /usr/libdata/debug//bin/sleep.debug...
>  | (gdb) r
>  | Starting program: /bin/sleep
>  | /usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/thread.c:1309: 
> internal-error: void switch_to_thread(thread_info*): Assertion `thr != NULL' 
> failed.
>  | A problem internal to GDB has been detected,
>  | further debugging may prove unreliable.
>  | Quit this debugging session? (y or n) y
>  | 
>  | This is a bug, please report it.  For instructions, see:
>  | .
>  | 
>  | /usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/thread.c:1309: 
> internal-error: void switch_to_thread(thread_info*): Assertion `thr != NULL' 
> failed.
>  | A problem internal to GDB has been detected,
>  | further debugging may prove unreliable.
>  | Create a core file of GDB? (y or n) y
>  | [ 240.7909538] sorry, pid 2675 was killed: orphaned traced process
>  | Abort (core dumped)
>  | Exit 134
>  | % gdb -core gdb.core gdb
>  | Reading symbols from gdb...
>  | Reading symbols from /usr/libdata/debug//usr/bin/gdb.debug...
>  | [New process 1687]
>  | [New process 2908]
>  | [New process 2801]
>  | [New process 1688]
>  | [New process 1668]
>  | Core was generated by `gdb'.
>  | Program terminated with signal SIGABRT, Aborted.
>  | #0  0x76efa39833ba in _lwp_kill () from /usr/lib/libc.so.12
>  | [Current thread is 1 (process 1687)]
>  | (gdb) bt
>  | #0  0x76efa39833ba in _lwp_kill () from /usr/lib/libc.so.12
>  | #1  0x76efa3983879 in abort () at /usr/src/lib/libc/stdlib/abort.c:74
>  | #2  0xd83814e9 in dump_core () at 
> /usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/utils.c:204
>  | #3  0xd8386315 in internal_vproblem(internal_problem *, const char 
> *, int, const char *, typedef __va_list_tag __va_list_tag *) (
>  | problem=problem@entry=0xd8bf05e0 , 
> file=, line=, fmt=, 
> ap=ap@entry=0x7f7fff084bc8)
>  | at /usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/utils.c:414
>  | #4  0xd83864fb in internal_verror (file=, 
> line=, fmt=, ap=ap@entry=0x7f7fff084bc8)
>  | at /usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/utils.c:439
>  | #5  0xd862e40a in internal_error (file=file@entry=0xd8758578 
> "/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/thread.c", 
> line=line@entry=1309, fmt=)
>  | at 
> /usr/src/external/gpl3/gdb/lib/libgdbsupport/../../dist/gdbsupport/errors.cc:55
>  | #6  0xd83a96f5 in switch_to_thread (thr=0x0) at 
> /usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/thread.c:1309
>  | #7  switch_to_thread (thr=) at 
> /usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/thread.c:1307
>  | #8  0xd854e02e in startup_inferior 
> (proc_target=proc_target@entry=0xd8bf1c50 , 
> pid=pid@entry=2675, ntraps=ntraps@entry=1,
>  | last_waitstatus=last_waitstatus@entry=0x0, 
> last_ptid=last_ptid@entry=0x0) at 
> /usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/nat/fork-inferior.c:539
>  | #9  0xd854ef07 in gdb_startup_inferior (pid=pid@entry=2675, 
> num_traps=num_traps@entry=1) at 
> /usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/fork-child.c:129
>  | #10 0xd84f8592 in inf_ptrace_target::create_inferior 
> (this=this@entry=0xd8bf1c50 , 
> exec_file=exec_file@entry=0x76efa67946f0 "/bin/sleep", allargs=...,
>  | env=env@entry=0x76efa6b1e400, from_tty=from_tty@entry=1) at 
> /usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/inf-ptrace.c:117
>  | #11 0xd82b98e0 in run_command_1 (args=, from_tty=1, 
> run_how=RUN_NORMAL) at 
> /usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/infcmd.c:493
>  | #12 0xd83663d2 in cmd_func (cmd=, args= out>, from_tty=) at 
> /usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/cli/cli-decode.c:2181
>  | #13 0xd83a402d in execute_command (p=, 
> p@entry=0x76efa6b5c020 "", from_tty=1) at 
> /usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/top.c:668
>  | #14 0xd82d726c in command_handler (command=0x76efa6b5c020 "") at 
> /usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/event-top.c:588
>  | #15 0xd82d81ad in command_line_handler (rl=...) at 
> /usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/event-top.c:773
>  | #16 0xd82d7ad5 in gdb_rl_callback_handler (rl=0x76efa6b5c200 "r") 
> at /usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/event-top.c:219
>  | #17 0xd864f85e in rl_callback_read_char () at 
> 

Re: CVS commit: src/external/gpl3/gdb/dist/gdb

2020-10-13 Thread Leonardo Taccari
Hello Kamil,

Kamil Rytarowski writes:
> Module Name:  src
> Committed By: kamil
> Date: Tue Oct  6 23:14:47 UTC 2020
>
> Modified Files:
>   src/external/gpl3/gdb/dist/gdb: inf-ptrace.c nbsd-nat.c
>
> Log Message:
> Undo local patches
>
> They are no longer needed (and are wrong).
> [...]

This seems to break gdb, e.g. by starting debugging sleep(1):

 | % gdb sleep
 | Reading symbols from sleep...
 | Reading symbols from /usr/libdata/debug//bin/sleep.debug...
 | (gdb) r
 | Starting program: /bin/sleep
 | /usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/thread.c:1309: 
internal-error: void switch_to_thread(thread_info*): Assertion `thr != NULL' 
failed.
 | A problem internal to GDB has been detected,
 | further debugging may prove unreliable.
 | Quit this debugging session? (y or n) y
 | 
 | This is a bug, please report it.  For instructions, see:
 | .
 | 
 | /usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/thread.c:1309: 
internal-error: void switch_to_thread(thread_info*): Assertion `thr != NULL' 
failed.
 | A problem internal to GDB has been detected,
 | further debugging may prove unreliable.
 | Create a core file of GDB? (y or n) y
 | [ 240.7909538] sorry, pid 2675 was killed: orphaned traced process
 | Abort (core dumped)
 | Exit 134
 | % gdb -core gdb.core gdb
 | Reading symbols from gdb...
 | Reading symbols from /usr/libdata/debug//usr/bin/gdb.debug...
 | [New process 1687]
 | [New process 2908]
 | [New process 2801]
 | [New process 1688]
 | [New process 1668]
 | Core was generated by `gdb'.
 | Program terminated with signal SIGABRT, Aborted.
 | #0  0x76efa39833ba in _lwp_kill () from /usr/lib/libc.so.12
 | [Current thread is 1 (process 1687)]
 | (gdb) bt
 | #0  0x76efa39833ba in _lwp_kill () from /usr/lib/libc.so.12
 | #1  0x76efa3983879 in abort () at /usr/src/lib/libc/stdlib/abort.c:74
 | #2  0xd83814e9 in dump_core () at 
/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/utils.c:204
 | #3  0xd8386315 in internal_vproblem(internal_problem *, const char 
*, int, const char *, typedef __va_list_tag __va_list_tag *) (
 | problem=problem@entry=0xd8bf05e0 , 
file=, line=, fmt=, 
ap=ap@entry=0x7f7fff084bc8)
 | at /usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/utils.c:414
 | #4  0xd83864fb in internal_verror (file=, 
line=, fmt=, ap=ap@entry=0x7f7fff084bc8)
 | at /usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/utils.c:439
 | #5  0xd862e40a in internal_error (file=file@entry=0xd8758578 
"/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/thread.c", 
line=line@entry=1309, fmt=)
 | at 
/usr/src/external/gpl3/gdb/lib/libgdbsupport/../../dist/gdbsupport/errors.cc:55
 | #6  0xd83a96f5 in switch_to_thread (thr=0x0) at 
/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/thread.c:1309
 | #7  switch_to_thread (thr=) at 
/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/thread.c:1307
 | #8  0xd854e02e in startup_inferior 
(proc_target=proc_target@entry=0xd8bf1c50 , 
pid=pid@entry=2675, ntraps=ntraps@entry=1,
 | last_waitstatus=last_waitstatus@entry=0x0, 
last_ptid=last_ptid@entry=0x0) at 
/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/nat/fork-inferior.c:539
 | #9  0xd854ef07 in gdb_startup_inferior (pid=pid@entry=2675, 
num_traps=num_traps@entry=1) at 
/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/fork-child.c:129
 | #10 0xd84f8592 in inf_ptrace_target::create_inferior 
(this=this@entry=0xd8bf1c50 , 
exec_file=exec_file@entry=0x76efa67946f0 "/bin/sleep", allargs=...,
 | env=env@entry=0x76efa6b1e400, from_tty=from_tty@entry=1) at 
/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/inf-ptrace.c:117
 | #11 0xd82b98e0 in run_command_1 (args=, from_tty=1, 
run_how=RUN_NORMAL) at 
/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/infcmd.c:493
 | #12 0xd83663d2 in cmd_func (cmd=, args=, from_tty=) at 
/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/cli/cli-decode.c:2181
 | #13 0xd83a402d in execute_command (p=, 
p@entry=0x76efa6b5c020 "", from_tty=1) at 
/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/top.c:668
 | #14 0xd82d726c in command_handler (command=0x76efa6b5c020 "") at 
/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/event-top.c:588
 | #15 0xd82d81ad in command_line_handler (rl=...) at 
/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/event-top.c:773
 | #16 0xd82d7ad5 in gdb_rl_callback_handler (rl=0x76efa6b5c200 "r") at 
/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/event-top.c:219
 | #17 0xd864f85e in rl_callback_read_char () at 
/usr/src/external/gpl3/gdb/dist/readline/readline/callback.c:281
 | #18 0xd82d6c5e in gdb_rl_callback_read_char_wrapper_noexcept () at 
/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/event-top.c:177
 | #19 0xd82d78e0 in gdb_rl_callback_read_char_wrapper 
(client_data=) at 

Re: CVS commit: src/external/gpl3/gdb/dist/gdb

2019-06-17 Thread Christos Zoulas
In article <20190617063353.57514f...@cvs.netbsd.org>,
matthew green  wrote:
>-=-=-=-=-=-
>
>Module Name:   src
>Committed By:  mrg
>Date:  Mon Jun 17 06:33:53 UTC 2019
>
>Modified Files:
>   src/external/gpl3/gdb/dist/gdb: ppc-nbsd-nat.c sh-nbsd-tdep.c
>
>Log Message:
>fix cross gdb build on sh and ppc:
>- gdb_assert.h has moved into common/gdb_assert.h.
>- force promotion to avoid compile errors
>
>XXX why aren't these files built into the native binary, and
>triggered normal build failures.

They are built into the native binary... There is a
-I${DIST}/gdb/common \
in the Makefile. Perhaps we should remove it. Also:

# XXX: I should fix these...
CPPFLAGS.i386-nbsd-tdep.c+= -Wno-narrowing
CPPFLAGS.arm-get-next-pcs.c+= -Wno-narrowing
CPPFLAGS.mips-tdep.c+= -Wno-narrowing
CPPFLAGS.sh-nbsd-tdep.c+= -Wno-narrowing
CPPFLAGS.ppc-nbsd-tdep.c+= -Wno-narrowing
CPPFLAGS.alpha-nbsd-tdep.c+= -Wno-narrowing
CPPFLAGS.alpha-tdep.c+= -Wno-narrowing
CPPFLAGS.rs6000-tdep.c+= -Wno-narrowing
CPPFLAGS.hppa-nbsd-tdep.c+= -Wno-narrowing

christos



Re: CVS commit: src/external/gpl3/gdb/dist/gdb

2016-11-07 Thread Martin Husemann
On Mon, Nov 07, 2016 at 06:38:54PM +1100, matthew green wrote:
> can we put this function into a netbsd-common file that all
> ports can reference, rather than repeating it?  ie, this is
> identical to the arm version, and probably others.

Yes please, IIUC Nick and Rin are working on that.

Martin


re: CVS commit: src/external/gpl3/gdb/dist/gdb

2016-11-06 Thread matthew green
"Martin Husemann" writes:
> Module Name:  src
> Committed By: martin
> Date: Sat Oct 29 17:02:07 UTC 2016
> 
> Modified Files:
>   src/external/gpl3/gdb/dist/gdb: alphanbsd-tdep.c
> 
> Log Message:
> Add a skip_solib_resolver, from Rin Okuyama, fixes single stepping for
> shared binaries.

can we put this function into a netbsd-common file that all
ports can reference, rather than repeating it?  ie, this is
identical to the arm version, and probably others.

i noticed that the openbsd version of this is one version.

thanks.


.mrg.


Re: CVS commit: src/external/gpl3/gdb/dist/gdb

2014-02-02 Thread David Laight
On Sun, Feb 02, 2014 at 05:00:38PM -0500, Christos Zoulas wrote:
 Module Name:  src
 Committed By: christos
 Date: Sun Feb  2 22:00:38 UTC 2014
 
 Modified Files:
   src/external/gpl3/gdb/dist/gdb: inf-ptrace.c
 
 Log Message:
 Fix threading bug again.
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/dist/gdb/inf-ptrace.c
@@ -374,7 +380,7 @@
 XXX __NetBSD__: We used to pass this as the signal
 sig = ptid_get_lwp(ptid);
*/
-  ptrace (request, pid, (PTRACE_TYPE_ARG3)1, gdb_signal_to_host (signal));
+  ptrace (request, pid, (PTRACE_TYPE_ARG3)1, sig);


You probably want to kill the comment from the last merge.

David

-- 
David Laight: da...@l8s.co.uk


Re: CVS commit: src/external/gpl3/gdb/dist/gdb

2014-02-02 Thread Christos Zoulas
In article 20140202223912.gd16...@snowdrop.l8s.co.uk,
David Laight  da...@l8s.co.uk wrote:
On Sun, Feb 02, 2014 at 05:00:38PM -0500, Christos Zoulas wrote:
 Module Name: src
 Committed By:christos
 Date:Sun Feb  2 22:00:38 UTC 2014
 
 Modified Files:
  src/external/gpl3/gdb/dist/gdb: inf-ptrace.c
 
 Log Message:
 Fix threading bug again.
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/dist/gdb/inf-ptrace.c
@@ -374,7 +380,7 @@
 XXX __NetBSD__: We used to pass this as the signal
 sig = ptid_get_lwp(ptid);
*/
-  ptrace (request, pid, (PTRACE_TYPE_ARG3)1, gdb_signal_to_host (signal));
+  ptrace (request, pid, (PTRACE_TYPE_ARG3)1, sig);


You probably want to kill the comment from the last merge.

Right.

christos