[Title] add sdb_setup() (Accidentally it was omitted from the previous job) and...
authormunkyu.im <munkyu.im@samsung.com>
Wed, 28 Sep 2011 08:00:39 +0000 (17:00 +0900)
committermunkyu.im <munkyu.im@samsung.com>
Wed, 28 Sep 2011 08:00:39 +0000 (17:00 +0900)
[Type]      // Commit Type: Feature / Bugfix / Enhancement
[Module]    // Module Name - (Main / Sub)
[Priority]  // Importance : Critical / Major / Minor
[CQ#]       // CQ Issue Number
[Redmine#]  // Redmine Isuue Number
[Problem]   // Problem Description
[Cause]     // Cause Description
[Solution]  // Solution Description
[TestCase]  // Executed the test-target

sdb.c
vl.c

diff --git a/sdb.c b/sdb.c
index c1b8df4..067acca 100644 (file)
--- a/sdb.c
+++ b/sdb.c
@@ -219,7 +219,7 @@ void sdb_setup(void)
                if(net_slirp_redir((char*)buf) < 0)
                        continue;
 
-               printf("SDB listening on port from %d to %d\n", port, port+9);
+               fprintf(stdout,"SDBD established on port %d\n", port+1);
                success = 1;
                break;
        }
@@ -227,8 +227,6 @@ void sdb_setup(void)
                fprintf(stderr, "it seems too many emulator instances are running on this machine. Aborting\n" );
                exit(1);
     }
-       setenv( "SDB_PORT", (char*)buf, 1);
-       fflush(stdout);
 
     /* Save base port. */
     SLP_base_port = port;
@@ -248,8 +246,8 @@ void sdb_setup(void)
                
         sprintf(tmp,"0013host:emulator:%d",port+1);
         socket_send(s, tmp, 30);
-               printf("sent '%s' to SDB server\n", tmp);
-               fflush(stdout);
+//             printf("sent '%s' to SDB server\n", tmp);
+//             fflush(stdout);
 
     }
     while (0);
diff --git a/vl.c b/vl.c
index d9a2a99..ffa1a4f 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -166,6 +166,7 @@ int main(int argc, char **argv)
 #include "arch_init.h"
 #include "vl.h"
 #include "ui/qemu-spice.h"
+#include "sdb.h"
 
 //#define DEBUG_NET
 //#define DEBUG_SLIRP
@@ -3146,6 +3147,9 @@ int qemu_main(int argc, char **argv, char **envp)
      * when bus is created by qdev.c */
     qemu_register_reset(qbus_reset_all_fn, sysbus_get_default());
     qemu_run_machine_init_done_notifiers();
+       
+       /* call sdb setup function */
+       sdb_setup();
 
     qemu_system_reset();
     if (loadvm) {