~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise-security

« back to all changes in this revision

Viewing changes to kernel/debug/kdb/kdb_debugger.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati
  • Date: 2011-12-06 15:56:07 UTC
  • Revision ID: package-import@ubuntu.com-20111206155607-pcf44kv5fmhk564f
Tags: 3.2.0-1401.1
[ Paolo Pisati ]

* Rebased on top of Ubuntu-3.2.0-3.8
* Tilt-tracking @ ef2487af4bb15bdd0689631774b5a5e3a59f74e2
* Delete debian.ti-omap4/control, it shoudln't be tracked
* Fix architecture spelling (s/armel/armhf/)
* [Config] Update configs following 3.2 import
* [Config] Fix compilation: disable CODA and ARCH_OMAP3
* [Config] Fix compilation: disable Ethernet Faraday
* Update series to precise

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
#include <linux/kgdb.h>
12
12
#include <linux/kdb.h>
13
13
#include <linux/kdebug.h>
 
14
#include <linux/export.h>
14
15
#include "kdb_private.h"
15
16
#include "../debug_core.h"
16
17
 
30
31
int kdb_poll_idx = 1;
31
32
EXPORT_SYMBOL_GPL(kdb_poll_idx);
32
33
 
 
34
static struct kgdb_state *kdb_ks;
 
35
 
33
36
int kdb_stub(struct kgdb_state *ks)
34
37
{
35
38
        int error = 0;
39
42
        kdb_dbtrap_t db_result = KDB_DB_NOBPT;
40
43
        int i;
41
44
 
 
45
        kdb_ks = ks;
42
46
        if (KDB_STATE(REENTRY)) {
43
47
                reason = KDB_REASON_SWITCH;
44
48
                KDB_STATE_CLEAR(REENTRY);
123
127
        KDB_STATE_CLEAR(PAGER);
124
128
        kdbnearsym_cleanup();
125
129
        if (error == KDB_CMD_KGDB) {
126
 
                if (KDB_STATE(DOING_KGDB) || KDB_STATE(DOING_KGDB2)) {
127
 
        /*
128
 
         * This inteface glue which allows kdb to transition in into
129
 
         * the gdb stub.  In order to do this the '?' or '' gdb serial
130
 
         * packet response is processed here.  And then control is
131
 
         * passed to the gdbstub.
132
 
         */
133
 
                        if (KDB_STATE(DOING_KGDB))
134
 
                                gdbstub_state(ks, "?");
135
 
                        else
136
 
                                gdbstub_state(ks, "");
 
130
                if (KDB_STATE(DOING_KGDB))
137
131
                        KDB_STATE_CLEAR(DOING_KGDB);
138
 
                        KDB_STATE_CLEAR(DOING_KGDB2);
139
 
                }
140
132
                return DBG_PASS_EVENT;
141
133
        }
142
134
        kdb_bp_install(ks->linux_regs);
166
158
        return kgdb_info[ks->cpu].ret_state;
167
159
}
168
160
 
 
161
void kdb_gdb_state_pass(char *buf)
 
162
{
 
163
        gdbstub_state(kdb_ks, buf);
 
164
}