gdb: update logic, move into core area

Signed-off-by: Christopher Larson <chris_larson@mentor.com>