[FS#637] GDB server doesn't work

LEDE Bugs lede-bugs at lists.infradead.org
Sat Mar 18 08:53:37 PDT 2017


A new Flyspray task has been opened.  Details are below. 

User who did this - Przemysław Fierek (prfi) 

Attached to Project - LEDE Project
Summary - GDB server doesn't work
Task Type - Bug Report
Category - Base system
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Low
Priority - Very Low
Reported Version - Trunk
Due in Version - Undecided
Due Date - Undecided
Details - I've tried to debug some code using GDB server on target device (Ubiquity AP AC PRO MIPS32r2) and I've found that it doesn't work.

I'm using std command to run GDB server: "gdbserver :9000 " and I always get "sigprocmask: Invalid argument.". 

I've made short investigation to find root cause of this problem and it seems that problem is located in GDB in file: "gdb/common/signals-state-save-restore.c" in line "res = sigprocmask (0,  NULL, &original_signal_mask);". According to linux kernel documentation function "sigprocmask" always return "-EINVAL" when it is called with invalid "how" argument (in this case how == 0). I've fixed GDB by removing "if" statement that checks if "res < 0". After this operation GDB server works properly.

LEDE commit: 08371a2db76ecba5236ae8aec1d57fee84e312d8
GDB version: 7.12.1


More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=637



More information about the lede-bugs mailing list